Commit 19f030f3 19f030f39b03af9134c97b7692d22e21c5fe2f23 by Christian Gerdes

Verkar som om jag fixade en NullPointer

- getSystemFileDescriptorsPercentUsed
1 parent b747bb02
......@@ -392,9 +392,13 @@ public class JmxMon {
public double getSystemFileDescriptorsPercentUsed() {
LongDelta ldo = getAttributeLongDelta("java.lang:type=OperatingSystem", "OpenFileDescriptorCount");
LongDelta ldm = getAttributeLongDelta("java.lang:type=OperatingSystem", "MaxFileDescriptorCount");
double open = ldo.getCurrentValue();
double max = ldm.getCurrentValue();
return (open/max) * 100D;
if(ldo != null && ldm != null) {
double open = ldo.getCurrentValue();
double max = ldm.getCurrentValue();
return (open/max) * 100D;
} else {
return 0;
}
}
public double getHeapUsedMB() {
......