mirror of https://github.com/apache/maven.git
allow a version of "02", for example
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@266297 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
17de4b0c7d
commit
a3a73ebaec
|
@ -178,7 +178,7 @@ public class DefaultArtifactVersion
|
|||
}
|
||||
}
|
||||
|
||||
if ( part1.indexOf( "." ) < 0 )
|
||||
if ( part1.indexOf( "." ) < 0 && !part1.startsWith( "0" ) )
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -228,7 +228,6 @@ public class DefaultArtifactVersion
|
|||
|
||||
private static Integer getNextIntegerToken( StringTokenizer tok )
|
||||
{
|
||||
|
||||
String s = tok.nextToken();
|
||||
if ( s.length() > 1 && s.startsWith( "0" ) )
|
||||
{
|
||||
|
|
|
@ -112,6 +112,13 @@ public class DefaultArtifactVersionTest
|
|||
assertEquals( "check incremental version", 0, version.getIncrementalVersion() );
|
||||
assertEquals( "check build number", 0, version.getBuildNumber() );
|
||||
assertEquals( "check qualifier", "0.09", version.getQualifier() );
|
||||
|
||||
version = new DefaultArtifactVersion( "02" );
|
||||
assertEquals( "check major version", 0, version.getMajorVersion() );
|
||||
assertEquals( "check minor version", 0, version.getMinorVersion() );
|
||||
assertEquals( "check incremental version", 0, version.getIncrementalVersion() );
|
||||
assertEquals( "check build number", 0, version.getBuildNumber() );
|
||||
assertEquals( "check qualifier", "02", version.getQualifier() );
|
||||
}
|
||||
|
||||
public void testVersionComparing()
|
||||
|
|
Loading…
Reference in New Issue