incubator-depot-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nickcha...@apache.org
Subject svn commit: rev 43408 - incubator/depot/trunk/version/src/java/org/apache/depot/version/impl
Date Mon, 06 Sep 2004 06:35:11 GMT
Author: nickchalko
Date: Sun Sep  5 23:35:10 2004
New Revision: 43408

Modified:
   incubator/depot/trunk/version/src/java/org/apache/depot/version/impl/ApacheVersion.java
Log:
Fixed the order of isCompatible to match the interface def.

Modified: incubator/depot/trunk/version/src/java/org/apache/depot/version/impl/ApacheVersion.java
==============================================================================
--- incubator/depot/trunk/version/src/java/org/apache/depot/version/impl/ApacheVersion.java
(original)
+++ incubator/depot/trunk/version/src/java/org/apache/depot/version/impl/ApacheVersion.java
Sun Sep  5 23:35:10 2004
@@ -292,8 +292,8 @@
 	/**
 	 * Compute if this version is compatible with other.
 	 * 
-	 * "Compatible" means (in effect) that other version is a "good replacement"
-	 * for the this one.
+	 * "Compatible" means (in effect) this version is a "good replacement"
+	 * for the other version.
 	 * 
 	 * The aspects of a version that are utilized are:
 	 *  - Major Version - Minor Version - Release Level
@@ -311,7 +311,7 @@
 	 *  
 	 */
 	public boolean isCompatible(Version other) {
-		boolean compatible = false;
+ 		boolean compatible = false;
 
 		//
 		// If this is unset, then all are compatible...
@@ -323,16 +323,16 @@
 			ApacheVersion otherApacheVersion = (ApacheVersion) other;
 
 			//
-			// *This* is unset, or major's equal
+			// *other is unset, or major's equal
 			//
-			if ((VersionDataElement.UNSET_MAJOR == getMajor())
+			if ((VersionDataElement.UNSET_MAJOR == otherApacheVersion.getMajor())
 					|| otherApacheVersion.getMajor() == getMajor()) {
 
 				//
-				// *This* is unset, or minor's equal
+				// other is unset, or minor's equal
 				//
-				if ((VersionDataElement.UNSET_MINOR == getMinor())
-						|| otherApacheVersion.getMinor() == getMinor()) {
+				if ((VersionDataElement.UNSET_MINOR == otherApacheVersion.getMinor())
+						||   getMinor() >=otherApacheVersion.getMinor()){
 
 					//
 					//  *Other* Release Level Higher

Mime
View raw message