Skip to content

Commit 0c09215

Browse files
committed
settings parameter fixed
1 parent 8f04672 commit 0c09215

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

visualvm/attach/src/org/graalvm/visualvm/attach/AttachModelImpl.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,11 @@ public boolean startJfrRecording(String name, String[] settings, String delay,
257257
}
258258
Map<String, Object> pars = new HashMap();
259259
if (name != null) pars.put(JCMD_JFR_START_NAME, name);
260-
if (settings != null) pars.put(JCMD_JFR_START_SETTINGS, settings);
260+
if (settings != null) {
261+
for (String setting : settings) {
262+
pars.put(JCMD_JFR_START_SETTINGS, setting);
263+
}
264+
}
261265
if (delay != null) pars.put(JCMD_JFR_START_DELAY, delay);
262266
if (duration != null) pars.put(JCMD_JFR_START_DURATION, duration);
263267
if (maxAge != null) pars.put(JCMD_JFR_START_MAXAGE, maxAge);

visualvm/jmx/src/org/graalvm/visualvm/jmx/impl/JmxSupport.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,11 @@ boolean startJfrRecording(String name, String[] settings, String delay, String d
517517
}
518518
Map<String, Object> pars = new HashMap();
519519
if (name != null) pars.put(JCMD_JFR_START_NAME, name);
520-
if (settings != null) pars.put(JCMD_JFR_START_SETTINGS, settings);
520+
if (settings != null) {
521+
for (String setting : settings) {
522+
pars.put(JCMD_JFR_START_SETTINGS, setting);
523+
}
524+
}
521525
if (delay != null) pars.put(JCMD_JFR_START_DELAY, delay);
522526
if (duration != null) pars.put(JCMD_JFR_START_DURATION, duration);
523527
if (maxAge != null) pars.put(JCMD_JFR_START_MAXAGE, maxAge);

0 commit comments

Comments
 (0)