changeset 1373:1a97ad3ab3f5

7901838: Specifying profiler in the parent options makes it appear twice during runtime
author shade
date Thu, 17 Nov 2016 18:24:50 +0100
parents 548d8d867582
children 65bd7d034e6b
files jmh-core/src/main/java/org/openjdk/jmh/runner/options/OptionsBuilder.java
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/jmh-core/src/main/java/org/openjdk/jmh/runner/options/OptionsBuilder.java	Wed Nov 16 21:10:51 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/runner/options/OptionsBuilder.java	Thu Nov 17 18:24:50 2016 +0100
@@ -220,10 +220,12 @@
 
     @Override
     public List<ProfilerConfig> getProfilers() {
+        List<ProfilerConfig> result = new ArrayList<>();
+        result.addAll(profilers);
         if (otherOptions != null) {
-            profilers.addAll(otherOptions.getProfilers());
+            result.addAll(otherOptions.getProfilers());
         }
-        return profilers;
+        return result;
     }
 
     // ---------------------------------------------------------------------------