Java 9 deprecation warning fixes for test-suite and examples
This commit is contained in:
parent
6d8c1c47f3
commit
e6035d625a
6 changed files with 20 additions and 12 deletions
|
|
@ -47,11 +47,11 @@ public class li_std_list_runme {
|
|||
} catch (java.util.NoSuchElementException e) {
|
||||
}
|
||||
|
||||
if (v1.remove(new Integer(123))) throw new RuntimeException("v1 test (13) failed");
|
||||
if (!v1.remove(new Integer(456))) throw new RuntimeException("v1 test (14) failed");
|
||||
if (v1.remove(Integer.valueOf(123))) throw new RuntimeException("v1 test (13) failed");
|
||||
if (!v1.remove(Integer.valueOf(456))) throw new RuntimeException("v1 test (14) failed");
|
||||
if (!v1.isEmpty()) throw new RuntimeException("v1 test (15) failed");
|
||||
if (v1.size() != 0) throw new RuntimeException("v1 test (16) failed");
|
||||
if (v1.remove(new Integer(456))) throw new RuntimeException("v1 test (17) failed");
|
||||
if (v1.remove(Integer.valueOf(456))) throw new RuntimeException("v1 test (17) failed");
|
||||
|
||||
if (new IntList(3).size() != 3) throw new RuntimeException("constructor initial size test failed");
|
||||
for (int n : new IntList(10, 999))
|
||||
|
|
@ -136,7 +136,7 @@ public class li_std_list_runme {
|
|||
v9.add(60);
|
||||
v9.add(70);
|
||||
if (v9.size() != 7) throw new RuntimeException("v9 test (1) failed");
|
||||
if (!v9.remove(new Integer(60))) throw new RuntimeException("v9 test (2) failed");
|
||||
if (!v9.remove(Integer.valueOf(60))) throw new RuntimeException("v9 test (2) failed");
|
||||
if (v9.size() != 6) throw new RuntimeException("v9 test (3) failed");
|
||||
v9.addFirst(-10);
|
||||
v9.addLast(80);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue