--- old/src/jdk.management/unix/classes/com/sun/management/internal/OperatingSystemImpl.java 2020-01-09 20:39:18.853145249 +0100 +++ new/src/jdk.management/unix/classes/com/sun/management/internal/OperatingSystemImpl.java 2020-01-09 20:39:18.719145109 +0100 @@ -1,5 +1,5 @@ /* - * 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 @@ -170,7 +170,7 @@ } private boolean isCpuSetSameAsHostCpuSet() { - if (containerMetrics != null) { + if (containerMetrics != null && containerMetrics.getCpuSetCpus() != null) { return containerMetrics.getCpuSetCpus().length == getHostConfiguredCpuCount0(); } return false;