changeset 894:82b88f09fc2b

runner: handle empty aggregated result.
author shade
date Thu, 03 Jul 2014 15:34:49 +0400
parents f8c2b0671f99
children 64f90d198105
files jmh-core/src/main/java/org/openjdk/jmh/results/RunResult.java
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/jmh-core/src/main/java/org/openjdk/jmh/results/RunResult.java	Thu Jul 03 14:36:04 2014 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/results/RunResult.java	Thu Jul 03 15:34:49 2014 +0400
@@ -80,6 +80,10 @@
      * @return merged benchmark result
      */
     public BenchmarkResult getAggregatedResult() {
+        if (benchmarkResults.isEmpty()) {
+            return null;
+        }
+
         Collection<IterationResult> results = new ArrayList<IterationResult>();
         for (BenchmarkResult r : benchmarkResults) {
             for (IterationResult ir : r.getIterationResults()) {