File tree 2 files changed +5
-5
lines changed
test/jdk/com/sun/management/OperatingSystemMXBean
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 1
1
/*
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.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* 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 {
39
39
double load ;
40
40
for (int i =0 ; i <10 ; i ++) {
41
41
load = mbean .getProcessCpuLoad ();
42
- if (( load <0.0 || load >1.0 ) && load != - 1.0 ) {
42
+ if (load <0.0 || load >1.0 ) {
43
43
throw new RuntimeException ("getProcessCpuLoad() returns " + load
44
44
+ " which is not in the [0.0,1.0] interval" );
45
45
}
Original file line number Diff line number Diff line change 1
1
/*
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.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* This code is free software; you can redistribute it and/or modify it
24
24
/*
25
25
* @test
26
26
* @bug 7028071
27
- * @summary Basic unit test of OperatingSystemMXBean.getProcessCpuLoad ()
27
+ * @summary Basic unit test of OperatingSystemMXBean.getSystemCpuLoad ()
28
28
*
29
29
* @run main GetSystemCpuLoad
30
30
*/
@@ -39,7 +39,7 @@ public static void main(String[] argv) throws Exception {
39
39
double load ;
40
40
for (int i =0 ; i <10 ; i ++) {
41
41
load = mbean .getSystemCpuLoad ();
42
- if (( load <0.0 || load >1.0 ) && load != - 1.0 ) {
42
+ if (load <0.0 || load >1.0 ) {
43
43
throw new RuntimeException ("getSystemCpuLoad() returns " + load
44
44
+ " which is not in the [0.0,1.0] interval" );
45
45
}
You can’t perform that action at this time.
0 commit comments