File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
buildSrc/src/main/java/org/springframework/boot/build/bom/bomr/version Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -64,21 +64,25 @@ public int compareTo(DependencyVersion other) {
64
64
65
65
@ Override
66
66
public boolean isUpgrade (DependencyVersion candidate , boolean movingToSnapshots ) {
67
- if (!( candidate instanceof ReleaseTrainDependencyVersion candidateReleaseTrain ) ) {
68
- return true ;
67
+ if (candidate instanceof ReleaseTrainDependencyVersion candidateReleaseTrain ) {
68
+ return isUpgrade ( candidateReleaseTrain , movingToSnapshots ) ;
69
69
}
70
- int comparison = this .releaseTrain .compareTo (candidateReleaseTrain .releaseTrain );
70
+ return true ;
71
+ }
72
+
73
+ private boolean isUpgrade (ReleaseTrainDependencyVersion candidate , boolean movingToSnapshots ) {
74
+ int comparison = this .releaseTrain .compareTo (candidate .releaseTrain );
71
75
if (comparison != 0 ) {
72
76
return comparison < 0 ;
73
77
}
74
- if (movingToSnapshots && !isSnapshot () && candidateReleaseTrain .isSnapshot ()) {
78
+ if (movingToSnapshots && !isSnapshot () && candidate .isSnapshot ()) {
75
79
return true ;
76
80
}
77
- comparison = this .type .compareTo (candidateReleaseTrain .type );
81
+ comparison = this .type .compareTo (candidate .type );
78
82
if (comparison != 0 ) {
79
83
return comparison < 0 ;
80
84
}
81
- return Integer .compare (this .version , candidateReleaseTrain .version ) < 0 ;
85
+ return Integer .compare (this .version , candidate .version ) < 0 ;
82
86
}
83
87
84
88
private boolean isSnapshot () {
You can’t perform that action at this time.
0 commit comments