FAQ
Author: brett
Date: Fri Sep 2 00:06:45 2005
New Revision: 266297

URL: http://svn.apache.org/viewcvs?rev=266297&view=rev
Log:
allow a version of "02", for example

Modified:
maven/components/trunk/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/DefaultArtifactVersion.java
maven/components/trunk/maven-artifact/src/test/java/org/apache/maven/artifact/versioning/DefaultArtifactVersionTest.java

Modified: maven/components/trunk/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/DefaultArtifactVersion.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/DefaultArtifactVersion.java?rev=266297&r1=266296&r2=266297&view=diff
==============================================================================
--- maven/components/trunk/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/DefaultArtifactVersion.java (original)
+++ maven/components/trunk/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/DefaultArtifactVersion.java Fri Sep 2 00:06:45 2005
@@ -178,7 +178,7 @@
}
}

- if ( part1.indexOf( "." ) < 0 )
+ if ( part1.indexOf( "." ) < 0 && !part1.startsWith( "0" ) )
{
try
{
@@ -228,7 +228,6 @@

private static Integer getNextIntegerToken( StringTokenizer tok )
{
-
String s = tok.nextToken();
if ( s.length() > 1 && s.startsWith( "0" ) )
{

Modified: maven/components/trunk/maven-artifact/src/test/java/org/apache/maven/artifact/versioning/DefaultArtifactVersionTest.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-artifact/src/test/java/org/apache/maven/artifact/versioning/DefaultArtifactVersionTest.java?rev=266297&r1=266296&r2=266297&view=diff
==============================================================================
--- maven/components/trunk/maven-artifact/src/test/java/org/apache/maven/artifact/versioning/DefaultArtifactVersionTest.java (original)
+++ maven/components/trunk/maven-artifact/src/test/java/org/apache/maven/artifact/versioning/DefaultArtifactVersionTest.java Fri Sep 2 00:06:45 2005
@@ -112,6 +112,13 @@
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()



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdev @
categoriesmaven
postedSep 2, '05 at 7:06a
activeSep 2, '05 at 7:06a
posts1
users1
websitemaven.apache.org
irc#maven

1 user in discussion

Brett: 1 post

People

Translate

site design / logo © 2021 Grokbase