Skip to content

Commit eb31a05

Browse files
author
Roger Riggs
committed
8256663: [test] Deprecated use of new Double in jshell ImportTest
8256667: [test] Unexpected warnings in javac test T8074381a Reviewed-by: lfoltan, mchung
1 parent 12f93eb commit eb31a05

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

test/langtools/jdk/jshell/ImportTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public void testImportOnDemand() {
6868

6969
public void testImportStatic() {
7070
assertImportKeyMatch("import static java.lang.Math.PI;", "PI", SINGLE_STATIC_IMPORT_SUBKIND, added(VALID));
71-
assertEval("new Double(PI).toString().substring(0, 16).equals(\"3.14159265358979\");", "true");
71+
assertEval("Double.valueOf(PI).toString().substring(0, 16).equals(\"3.14159265358979\");", "true");
7272
}
7373

7474
public void testImportStaticOnDemand() {

test/langtools/tools/javac/lambda/8074381/T8074381a.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ interface Sub<X> extends Sup<String> {
1313
boolean m(String s);
1414
}
1515

16-
@SuppressWarnings("deprecation")
16+
@SuppressWarnings({"deprecation", "removal"})
1717
void testRaw() {
1818
Sub s1 = c -> true;
1919
Sub s2 = Boolean::new;
@@ -23,7 +23,7 @@ void testRaw() {
2323
};
2424
}
2525

26-
@SuppressWarnings("deprecation")
26+
@SuppressWarnings({"deprecation", "removal"})
2727
void testNonRaw() {
2828
Sub<Integer> s1 = c -> true;
2929
Sub<Integer> s2 = Boolean::new;

0 commit comments

Comments
 (0)