harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ge...@apache.org
Subject svn commit: r441111 - /incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Package.java
Date Thu, 07 Sep 2006 15:09:25 GMT
Author: geirm
Date: Thu Sep  7 08:09:24 2006
New Revision: 441111

URL: http://svn.apache.org/viewvc?view=rev&rev=441111
Log:
HARMONY-1281

fix for java.lang.Package.isCompatible(String) - if the desired
version is longer in tokens (1.4.1.0) than the jar version
(1.4) then it could be a problem if the extra version 
identifiers weren't zero


Modified:
    incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Package.java

Modified: incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Package.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Package.java?view=diff&rev=441111&r1=441110&r2=441111
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Package.java
(original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Package.java
Thu Sep  7 08:09:24 2006
@@ -212,7 +212,26 @@
                 }
             }
         } catch (NoSuchElementException e) {
+        	
+        	/* 
+        	 * ignore - this seems to be the case when we run out of tokens
+        	 * for desiredVersion
+        	 */
         }
+        
+        /*
+         *   now, if desired is longer than spec, and they have been 
+         *   equal so far (ex.  1.4  <->  1.4.0.0) then the remainder
+         *   better be zeros
+         */
+
+    	while (desiredVersionTokens.hasMoreTokens()) {
+    		if (0 != Integer.parseInt(desiredVersionTokens.nextToken())) {
+        		return false;
+        	}
+    	}
+
+        
         return true;
     }
 



Mime
View raw message