8154504: javac tests fail after JDK API is deprecated
authorjjg
Mon, 18 Apr 2016 18:41:38 -0700
changeset 37636 6c6e6e25189d
parent 37635 9834489579e5
child 37637 b47af0433922
8154504: javac tests fail after JDK API is deprecated Reviewed-by: darcy
langtools/test/tools/javac/CaptureInSubtype.java
langtools/test/tools/javac/OverrideChecks/T4721069.java
langtools/test/tools/javac/generics/Nonlinear.java
langtools/test/tools/javac/generics/odersky/BadTest4.java
langtools/test/tools/javac/lambda/8074381/T8074381a.java
langtools/test/tools/javac/lambda/8074381/T8074381a.out
langtools/test/tools/javac/lambda/TargetType27.java
--- a/langtools/test/tools/javac/CaptureInSubtype.java	Mon Apr 18 14:04:09 2016 -0700
+++ b/langtools/test/tools/javac/CaptureInSubtype.java	Mon Apr 18 18:41:38 2016 -0700
@@ -33,7 +33,7 @@
 
 
     public static class ShowFlaw extends SuperOfShowFlaw {
-        static Flaw<Number> fn =  new Flaw<Number>(new Integer(3));
+        static Flaw<Number> fn =  new Flaw<Number>(Integer.valueOf(3));
 
         Flaw<?> m(){return fn;}
     }
--- a/langtools/test/tools/javac/OverrideChecks/T4721069.java	Mon Apr 18 14:04:09 2016 -0700
+++ b/langtools/test/tools/javac/OverrideChecks/T4721069.java	Mon Apr 18 18:41:38 2016 -0700
@@ -12,7 +12,7 @@
     static class T {
         static void f(I i) {
             if (i == null) {
-                Integer x = new Integer(2);
+                Integer x = Integer.valueOf(2);
             } else {
                 I x = i;
                 x.getClass();
--- a/langtools/test/tools/javac/generics/Nonlinear.java	Mon Apr 18 14:04:09 2016 -0700
+++ b/langtools/test/tools/javac/generics/Nonlinear.java	Mon Apr 18 18:41:38 2016 -0700
@@ -22,7 +22,7 @@
     // the program.
 
     public static void main (String [] args) {
-        Integer x = new Integer (5);
+        Integer x = Integer.valueOf(5);
         String y = castit (x);
         System.out.println (y);
     }
--- a/langtools/test/tools/javac/generics/odersky/BadTest4.java	Mon Apr 18 14:04:09 2016 -0700
+++ b/langtools/test/tools/javac/generics/odersky/BadTest4.java	Mon Apr 18 18:41:38 2016 -0700
@@ -30,7 +30,7 @@
         static <A> Cell<A> makeCell(A x) { return new Cell<A>(x); }
         static <A> A id(A x) { return x; }
 
-        static Integer i = new Integer(1);
+        static Integer i = Integer.valueOf(1);
         static Number n = i;
 
         public static void main(String[] args) {
--- a/langtools/test/tools/javac/lambda/8074381/T8074381a.java	Mon Apr 18 14:04:09 2016 -0700
+++ b/langtools/test/tools/javac/lambda/8074381/T8074381a.java	Mon Apr 18 18:41:38 2016 -0700
@@ -13,6 +13,7 @@
         boolean m(String s);
     }
 
+    @SuppressWarnings("deprecation")
     void testRaw() {
         Sub s1 = c -> true;
         Sub s2 = Boolean::new;
@@ -22,6 +23,7 @@
         };
     }
 
+    @SuppressWarnings("deprecation")
     void testNonRaw() {
         Sub<Integer> s1 = c -> true;
         Sub<Integer> s2 = Boolean::new;
--- a/langtools/test/tools/javac/lambda/8074381/T8074381a.out	Mon Apr 18 14:04:09 2016 -0700
+++ b/langtools/test/tools/javac/lambda/8074381/T8074381a.out	Mon Apr 18 18:41:38 2016 -0700
@@ -1,4 +1,4 @@
-T8074381a.java:17:18: compiler.err.prob.found.req: (compiler.misc.no.suitable.functional.intf.inst: T8074381a.Sub)
 T8074381a.java:18:18: compiler.err.prob.found.req: (compiler.misc.no.suitable.functional.intf.inst: T8074381a.Sub)
-T8074381a.java:19:28: compiler.err.does.not.override.abstract: compiler.misc.anonymous.class: T8074381a$1, m(java.lang.Object), T8074381a.Sup
+T8074381a.java:19:18: compiler.err.prob.found.req: (compiler.misc.no.suitable.functional.intf.inst: T8074381a.Sub)
+T8074381a.java:20:28: compiler.err.does.not.override.abstract: compiler.misc.anonymous.class: T8074381a$1, m(java.lang.Object), T8074381a.Sup
 3 errors
--- a/langtools/test/tools/javac/lambda/TargetType27.java	Mon Apr 18 14:04:09 2016 -0700
+++ b/langtools/test/tools/javac/lambda/TargetType27.java	Mon Apr 18 18:41:38 2016 -0700
@@ -15,6 +15,6 @@
     <A, R> F<A, R> m(F<A, R>  f) { return null; }
 
     void test() {
-        m((String s1) ->  (String s2) ->  new Integer(1));
+        m((String s1) ->  (String s2) -> Integer.valueOf(1));
     }
 }