2010-12-10 Bernd Hufmann <bhufmann@gmail.com> Contribution for bug 325661
authorBernd Hufmann <bhufmann@gmail.com>
Fri, 10 Dec 2010 13:58:37 +0000 (13:58 +0000)
committerBernd Hufmann <bhufmann@gmail.com>
Fri, 10 Dec 2010 13:58:37 +0000 (13:58 +0000)
* src/org/eclipse/linuxtools/lttng/ui/views/statistics/model/FixedArray.java (hashCode): Better hashing algorithm

org.eclipse.linuxtools.lttng.ui/ChangeLog
org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/lttng/ui/views/statistics/model/FixedArray.java

index 612f91633ad88b8a3262d1f045c173d8f54f0fdb..1e0ae3d11ddef02b6a9d2bcd984938060a90abd6 100644 (file)
@@ -1,3 +1,7 @@
+2010-12-10  Bernd Hufmann  <bhufmann@gmail.com>
+
+       * src/org/eclipse/linuxtools/lttng/ui/views/statistics/model/FixedArray.java (hashCode): Better hashing algorithm
+
 2010-12-08  Francois Chouinard  <fchouinard@gmail.com>
 
        * src/org/eclipse/linuxtools/lttng/ui/views/controlflow/ControlFlowView.java: Fix the icon path
index f09036e76b7d8fe9d3e15f9eb956221dcde12c7f..9bc50f73266e0c8b590fd7fb9076579f8fdd9d75 100644 (file)
@@ -151,11 +151,7 @@ public final class FixedArray implements RandomAccess {
         */
        @Override
        public int hashCode() {
-               int hash = 1;
-               for (int i = 0; i < fArray.length; ++i) {
-                       hash = hash ^ fArray[i];
-               }
-               return hash;
+           return Arrays.hashCode(fArray);
        }
        /**
         * Sets value at given index.
This page took 0.029767 seconds and 5 git commands to generate.