< prev index next >

src/jdk.management/unix/classes/com/sun/management/internal/OperatingSystemImpl.java

Print this page
@  rev 57586 : Review changes
|
~

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -168,11 +168,11 @@
     public double getProcessCpuLoad() {
         return getProcessCpuLoad0();
     }
 
     private boolean isCpuSetSameAsHostCpuSet() {
-        if (containerMetrics != null) {
+        if (containerMetrics != null && containerMetrics.getCpuSetCpus() != null) {
             return containerMetrics.getCpuSetCpus().length == getHostConfiguredCpuCount0();
         }
         return false;
     }
 
< prev index next >