correct parsing of versions that appear to have a build number, but don't otherwise match the format

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@280509 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Leslie Porter 2005-09-13 05:44:07 +00:00
parent be460f201a
commit 8cad4f0854
2 changed files with 8 additions and 0 deletions

View File

@ -188,6 +188,7 @@ public class DefaultArtifactVersion
{
// qualifier is the whole version, including "-"
qualifier = version;
buildNumber = null;
}
}
else

View File

@ -119,6 +119,13 @@ public class DefaultArtifactVersionTest
assertEquals( "check incremental version", 0, version.getIncrementalVersion() );
assertEquals( "check build number", 0, version.getBuildNumber() );
assertEquals( "check qualifier", "02", version.getQualifier() );
version = new DefaultArtifactVersion( "PATCH-1193602" );
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", "PATCH-1193602", version.getQualifier() );
}
public void testVersionComparing()