From a829d920eecf44a0cb4e487429edf4ea13a6283c Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Thu, 19 Apr 2018 19:56:03 -0400 Subject: [PATCH] Remove stale comment from JVM stats (#29625) We removed catched throwable from the code base and left behind was a comment about catching InternalError in MemoryManagementMXBean. We are not going to catch InternalError here as we expect that to be fatal. This commit removes that stale comment. --- .../main/java/org/elasticsearch/monitor/jvm/JvmStats.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/server/src/main/java/org/elasticsearch/monitor/jvm/JvmStats.java b/server/src/main/java/org/elasticsearch/monitor/jvm/JvmStats.java index e9d3adba68255..45180fd1c6f0a 100644 --- a/server/src/main/java/org/elasticsearch/monitor/jvm/JvmStats.java +++ b/server/src/main/java/org/elasticsearch/monitor/jvm/JvmStats.java @@ -82,10 +82,8 @@ public static JvmStats jvmStats() { peakUsage.getUsed() < 0 ? 0 : peakUsage.getUsed(), peakUsage.getMax() < 0 ? 0 : peakUsage.getMax() )); - } catch (Exception ex) { - /* ignore some JVMs might barf here with: - * java.lang.InternalError: Memory Pool not found - * we just omit the pool in that case!*/ + } catch (final Exception ignored) { + } } Mem mem = new Mem(heapCommitted, heapUsed, heapMax, nonHeapCommitted, nonHeapUsed, Collections.unmodifiableList(pools));