Skip to content

Commit 4334a79

Browse files
committed
GH-330 histogram is not available for read-only JMX connection
1 parent 0ca3bbb commit 4334a79

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,7 @@ String getFlagValue(String name) {
408408
}
409409

410410
HeapHistogram takeHeapHistogram() {
411+
if (isReadOnlyConnection()) return null;
411412
String histo = executeJCmd(HISTOGRAM_COMMAND, Collections.singletonMap(ALL_OBJECTS_OPTION, null));
412413
if (histo != null) {
413414
return new HeapHistogramImpl((String)histo);

0 commit comments

Comments
 (0)