File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
test/jdk/com/sun/management/OperatingSystemMXBean Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 11/*
2- * Copyright (c) 2011, 2015 , Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 2011, 2025 , Oracle and/or its affiliates. All rights reserved.
33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44 *
55 * This code is free software; you can redistribute it and/or modify it
@@ -39,7 +39,7 @@ public static void main(String[] argv) throws Exception {
3939 double load ;
4040 for (int i =0 ; i <10 ; i ++) {
4141 load = mbean .getProcessCpuLoad ();
42- if (( load <0.0 || load >1.0 ) && load != - 1.0 ) {
42+ if (load <0.0 || load >1.0 ) {
4343 throw new RuntimeException ("getProcessCpuLoad() returns " + load
4444 + " which is not in the [0.0,1.0] interval" );
4545 }
Original file line number Diff line number Diff line change 11/*
2- * Copyright (c) 2011, 2015 , Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 2011, 2025 , Oracle and/or its affiliates. All rights reserved.
33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44 *
55 * This code is free software; you can redistribute it and/or modify it
2424/*
2525 * @test
2626 * @bug 7028071
27- * @summary Basic unit test of OperatingSystemMXBean.getProcessCpuLoad ()
27+ * @summary Basic unit test of OperatingSystemMXBean.getSystemCpuLoad ()
2828 *
2929 * @run main GetSystemCpuLoad
3030 */
@@ -39,7 +39,7 @@ public static void main(String[] argv) throws Exception {
3939 double load ;
4040 for (int i =0 ; i <10 ; i ++) {
4141 load = mbean .getSystemCpuLoad ();
42- if (( load <0.0 || load >1.0 ) && load != - 1.0 ) {
42+ if (load <0.0 || load >1.0 ) {
4343 throw new RuntimeException ("getSystemCpuLoad() returns " + load
4444 + " which is not in the [0.0,1.0] interval" );
4545 }
You can’t perform that action at this time.
0 commit comments