File tree Expand file tree Collapse file tree
main/java/org/springframework/data/release/model
test/java/org/springframework/data/release/model Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -551,6 +551,7 @@ public int compareTo(Suffix o) {
551551 if (sv .type .equals ("SR" )) {
552552 return -1 ;
553553 }
554+ return 1 ;
554555 }
555556
556557 return o instanceof Release ? 0 : -1 ;
Original file line number Diff line number Diff line change @@ -143,6 +143,10 @@ void ordersCorrectly() {
143143 .isGreaterThan (ArtifactVersion .of ("1.9.0-M1" ));
144144 assertThat (ArtifactVersion .of ("1.9.0-M2" )).isGreaterThan (ArtifactVersion .of ("1.9.0-SNAPSHOT" ))
145145 .isLessThan (ArtifactVersion .of ("1.9.0-RC1" )).isLessThan (ArtifactVersion .of ("1.9.0" ));
146+
147+ assertThat (ArtifactVersion .of ("1.9.0.M1" )).isLessThan (ArtifactVersion .of ("1.9.0" ))
148+ .isLessThan (ArtifactVersion .of ("1.9.0.RELEASE" )).isLessThan (ArtifactVersion .of ("1.9.0-SR1" ));
149+ assertThat (ArtifactVersion .of ("1.9.0.RELEASE" )).isGreaterThan (ArtifactVersion .of ("1.9.0.M1" ));
146150 }
147151
148152 @ Test
@@ -152,4 +156,5 @@ void returnsCorrectBugfixVersions() {
152156 assertThat (ArtifactVersion .of ("1.0.0-M1" ).getNextBugfixVersion ()).isEqualTo (ArtifactVersion .of ("1.0.0-SNAPSHOT" ));
153157 assertThat (ArtifactVersion .of ("1.0.1" ).getNextBugfixVersion ()).isEqualTo (ArtifactVersion .of ("1.0.2-SNAPSHOT" ));
154158 }
159+
155160}
You can’t perform that action at this time.
0 commit comments