You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by ju...@apache.org on 2002/10/09 15:56:03 UTC
cvs commit: jakarta-commons-sandbox/jrcs/src/java/org/apache/commons/jrcs/rcs Version.java
juanco 2002/10/09 06:56:03
Modified: jrcs/src/java/org/apache/commons/jrcs/rcs Version.java
Log:
changed Version.compareTo() so it uses the same criteria CVS and RCS-CI use
Revision Changes Path
1.2 +6 -11 jakarta-commons-sandbox/jrcs/src/java/org/apache/commons/jrcs/rcs/Version.java
Index: Version.java
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/jrcs/src/java/org/apache/commons/jrcs/rcs/Version.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Version.java 28 May 2002 16:45:53 -0000 1.1
+++ Version.java 9 Oct 2002 13:56:03 -0000 1.2
@@ -244,20 +244,15 @@
{
throw new IllegalArgumentException(other.toString());
}
- else
- {
- Version otherver = (Version) other;
- if (this.size() < otherver.size())
+ else {
+ Version otherVer = (Version) other;
+ if (this.size() != otherVer.size())
{
- return -1;
- }
- else if (this.size() > otherver.size())
- {
- return 1;
+ return this.size() - otherVer.size();
}
else
{
- return -toString().compareTo(otherver.toString());
+ return -compareVersions(otherVer);
}
}
}
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>