You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
StringerrorMessage = format("The 'Implementation-Version' manifest attribute can't be fetched from the jar file[class resource : '{}'] by the target class[name :'{}']", classResource, targetClass.getName());
343
410
thrownewIllegalArgumentException(errorMessage);
344
411
}
345
412
returnof(version);
346
413
}
347
414
348
-
staticintgetValue(StringTokenizerst) {
349
-
if (st.hasMoreTokens()) {
350
-
returngetValue(st.nextToken());
351
-
}
352
-
return0;
353
-
}
354
-
355
415
staticintgetValue(Stringpart) {
356
416
finalintvalue;
357
417
try {
@@ -373,10 +433,10 @@ public boolean test(Version v1, Version v2) {
373
433
if (v1 == v2) {
374
434
returntrue;
375
435
}
376
-
if (v2 == null) returnfalse;
377
-
if (v1.major != v2.major)returnfalse;
378
-
if (v1.minor != v2.minor) returnfalse;
379
-
returnv1.patch == v2.patch;
436
+
if (v1 == null || v2 == null) {
437
+
returnfalse;
438
+
}
439
+
returnv1.compareTo(v2) == 0;
380
440
}
381
441
},
382
442
@@ -389,7 +449,9 @@ public boolean test(Version v1, Version v2) {
389
449
if (v1 == v2) {
390
450
returnfalse;
391
451
}
392
-
if (v2 == null) returnfalse;
452
+
if (v1 == null || v2 == null) {
453
+
returnfalse;
454
+
}
393
455
returnv1.compareTo(v2) < 0;
394
456
}
395
457
},
@@ -403,7 +465,9 @@ public boolean test(Version v1, Version v2) {
403
465
if (v1 == v2) {
404
466
returntrue;
405
467
}
406
-
if (v2 == null) returnfalse;
468
+
if (v1 == null || v2 == null) {
469
+
returnfalse;
470
+
}
407
471
returnv1.compareTo(v2) <= 0;
408
472
}
409
473
},
@@ -417,7 +481,9 @@ public boolean test(Version v1, Version v2) {
417
481
if (v1 == v2) {
418
482
returnfalse;
419
483
}
420
-
if (v2 == null) returnfalse;
484
+
if (v1 == null || v2 == null) {
485
+
returnfalse;
486
+
}
421
487
returnv1.compareTo(v2) > 0;
422
488
}
423
489
},
@@ -431,7 +497,9 @@ public boolean test(Version v1, Version v2) {
431
497
if (v1 == v2) {
432
498
returntrue;
433
499
}
434
-
if (v2 == null) returnfalse;
500
+
if (v1 == null || v2 == null) {
501
+
returnfalse;
502
+
}
435
503
returnv1.compareTo(v2) >= 0;
436
504
}
437
505
};
@@ -473,6 +541,5 @@ public static Operator of(String symbol) {
0 commit comments