changeset 1279:d24f71ad041e

7901500: When Runner.runSingle() mismatches, it says "more than single benchmark is matching"
author shade
date Fri, 11 Sep 2015 01:30:26 +0300
parents 1bbe29bb4639
children ff933497671f
files jmh-core/src/main/java/org/openjdk/jmh/runner/Runner.java
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/jmh-core/src/main/java/org/openjdk/jmh/runner/Runner.java	Fri Sep 11 01:16:34 2015 +0300
+++ b/jmh-core/src/main/java/org/openjdk/jmh/runner/Runner.java	Fri Sep 11 01:30:26 2015 +0300
@@ -162,7 +162,11 @@
                 throw new RunnerException("No results returned");
             }
         } else {
-            throw new RunnerException("More than single benchmark is matching the options");
+            if (benchmarks.size() > 1) {
+                throw new RunnerException("More than single benchmark are matching the options: " + benchmarks);
+            } else {
+                throw new NoBenchmarksException();
+            }
         }
     }