changeset 124:d81474dacdf3

Add proper hashCode to BenchmarkInfo. (A little more compilation speedup)
author shade
date Wed, 21 Aug 2013 12:42:23 +0400
parents dc316f7e2efa
children 40356c1dda20
files jmh-core/src/main/java/org/openjdk/jmh/processor/internal/BenchmarkInfo.java
diffstat 1 files changed, 17 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/jmh-core/src/main/java/org/openjdk/jmh/processor/internal/BenchmarkInfo.java	Tue Aug 20 22:40:43 2013 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/processor/internal/BenchmarkInfo.java	Wed Aug 21 12:42:23 2013 +0400
@@ -40,4 +40,21 @@
         this.generatedName = generatedPackageName + "." + generatedClassName;
         this.methodGroups = methods;
     }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+
+        BenchmarkInfo that = (BenchmarkInfo) o;
+
+        if (!userName.equals(that.userName)) return false;
+
+        return true;
+    }
+
+    @Override
+    public int hashCode() {
+        return userName.hashCode();
+    }
 }