harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sjanu...@apache.org
Subject svn commit: r672195 - /harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ByteCode.java
Date Fri, 27 Jun 2008 09:11:46 GMT
Author: sjanuary
Date: Fri Jun 27 02:11:46 2008
New Revision: 672195

URL: http://svn.apache.org/viewvc?rev=672195&view=rev
Log:
Apply patch for HARMONY-5884 ([classlib][pack200] Improve ByteCode hashCode)

Modified:
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ByteCode.java

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ByteCode.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ByteCode.java?rev=672195&r1=672194&r2=672195&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ByteCode.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ByteCode.java
Fri Jun 27 02:11:46 2008
@@ -109,11 +109,9 @@
     public int hashCode() {
         final int prime = 31;
         int result = 1;
-        result = prime * result + getByteCodeForm().getOpcode();
+        result = prime * result + getByteCodeForm().hashCode();
         // Don't forget to take the operands = rewrite into account
-        for (int index = 1; index < rewrite.length; index++) {
-            result = result + rewrite[index];
-        }
+        result += rewrite.hashCode();
         return result;
     }
 



Mime
View raw message