You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@depot.apache.org by ni...@apache.org on 2004/09/06 06:35:11 UTC

svn commit: rev 43408 - incubator/depot/trunk/version/src/java/org/apache/depot/version/impl

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