changeset 455:f3abe632b76f

Properly disable the annotation collision detection.
author shade
date Sat, 01 Mar 2014 02:12:20 +0400
parents e9b52c98e4c5
children 8fca1e8a318f
files jmh-core/src/main/java/org/openjdk/jmh/generators/source/MethodGroup.java
diffstat 1 files changed, 8 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/jmh-core/src/main/java/org/openjdk/jmh/generators/source/MethodGroup.java	Sat Mar 01 02:12:05 2014 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/generators/source/MethodGroup.java	Sat Mar 01 02:12:20 2014 +0400
@@ -243,13 +243,15 @@
         T finalAnn = null;
         for (MethodInvocation mi : methods) {
             T ann = BenchmarkGeneratorUtils.getAnnSyntax(mi.method, klass);
-            if (ann != null && finalAnn != null) {
-// FIXME: Temporalily disabled before we figure the proxy annotations equals/hashCode
-//                if (!finalAnn.equals(ann)) {
-//                    throw new GenerationException("Colliding annotations: " + ann + " vs. " + finalAnn + " " + ann.getClass() + " " + finalAnn.getClass(), mi.method);
-//                }
+            if (ann != null) {
+                // FIXME: Temporalily disabled before we figure the proxy annotations equals/hashCode
+                if (false && finalAnn != null && !finalAnn.equals(ann)) {
+                    if (!finalAnn.equals(ann)) {
+                        throw new GenerationException("Colliding annotations: " + ann + " vs. " + finalAnn, mi.method);
+                    }
+                }
+                finalAnn = ann;
             }
-            finalAnn = ann;
         }
         return finalAnn;
     }