kkhatua commented on a change in pull request #1437: DRILL-6702: Disable CPU 
Reporting for non-HotSpot JDKs
URL: https://github.com/apache/drill/pull/1437#discussion_r213771375
 
 

 ##########
 File path: common/src/main/java/org/apache/drill/exec/metrics/CpuGaugeSet.java
 ##########
 @@ -63,7 +72,7 @@ public OperatingSystemLoad(OperatingSystemMXBean osBean) {
 
   @Override
   public Double getValue() {
-    return osMXBean.getSystemLoadAverage();
+    return (osMXBean != null) ? osMXBean.getSystemLoadAverage(): null;
 
 Review comment:
   For readability. Helps delineate the condition and the 2 values.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to