changeset 308:7935ed77fc13

Explicitly disallow "protected" @GMB methods. (The reminiscent of legacy code generation scheme)
author shade
date Thu, 05 Dec 2013 14:39:53 +0400
parents 77875ed7104b
children c8c44a6b144b
files jmh-core/src/main/java/org/openjdk/jmh/processor/internal/GenerateMicroBenchmarkProcessor.java
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/jmh-core/src/main/java/org/openjdk/jmh/processor/internal/GenerateMicroBenchmarkProcessor.java	Thu Dec 05 14:37:16 2013 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/processor/internal/GenerateMicroBenchmarkProcessor.java	Thu Dec 05 14:39:53 2013 +0400
@@ -602,9 +602,9 @@
                             + " needs to be greater than 0.",
                     method);
         }
-        if (!method.getModifiers().contains(Modifier.PUBLIC) && !method.getModifiers().contains(Modifier.PROTECTED)) {
+        if (!method.getModifiers().contains(Modifier.PUBLIC)) {
             throw new GenerationException(
-                    "@" + GenerateMicroBenchmark.class.getSimpleName() + " method should be public or protected.",
+                    "@" + GenerateMicroBenchmark.class.getSimpleName() + " method should be public.",
                     method);
         }
     }