File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
main/java/org/scm4j/commons
test/java/org/scm4j/commons Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -111,11 +111,11 @@ public Version getVersion() {
111111
112112 @ Override
113113 public String toString () {
114- return toString ( version .toString ()) ;
114+ return getName () + verPrefix + version .toString () + verSuffix + classifier + extension + commentStr ;
115115 }
116116
117117 public String toString (String versionStr ) {
118- String str = verPrefix .isEmpty () && !versionStr .isEmpty () ? ":" : verPrefix ;
118+ String str = verPrefix .isEmpty () && !versionStr .isEmpty () ? ":" : verSuffix . isEmpty () && versionStr . isEmpty () ? "" : verPrefix ;
119119 str += versionStr + verSuffix + classifier + extension ;
120120 return getName () + str + commentStr ;
121121 }
Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ public void testVersionChange() {
9292 assertEquals ("eu.untill:JTerminal:12.13:abc@efg # comment" , new Coords ("eu.untill:JTerminal::abc@efg # comment" ).toString ("12.13" ));
9393 assertEquals ("eu.untill:JTerminal::abc@efg # comment" , new Coords ("eu.untill:JTerminal:12.13:abc@efg # comment" ).toString ("" ));
9494 assertEquals ("eu.untill:JTerminal::# comment" , new Coords ("eu.untill:JTerminal:12.13:# comment" ).toString ("" ));
95- assertEquals ("eu.untill:JTerminal: # comment" , new Coords ("eu.untill:JTerminal:12.13 # comment" ).toString ("" ));
95+ assertEquals ("eu.untill:JTerminal # comment" , new Coords ("eu.untill:JTerminal:12.13 # comment" ).toString ("" ));
9696 assertEquals ("eu.untill:JTerminal # comment" , new Coords ("eu.untill:JTerminal # comment" ).toString ("" ));
9797 assertEquals ("eu.untill:JTerminal:12.13 # comment" , new Coords ("eu.untill:JTerminal # comment" ).toString ("12.13" ));
9898 }
You can’t perform that action at this time.
0 commit comments