8219915: [TESTBUG] Fix test langtools/tools/javac/processing/model/completionfailure/SymbolsDontCumulate.java in Standalone mode
authorclanger
Fri, 01 Mar 2019 10:15:04 +0000
changeset 53969 b342deab639f
parent 53968 6862a1997fbb
child 53970 1ad7c590a6e7
child 57229 37f1897abaf0
child 57233 faf96b92a47b
8219915: [TESTBUG] Fix test langtools/tools/javac/processing/model/completionfailure/SymbolsDontCumulate.java in Standalone mode Reviewed-by: jlahoda
test/langtools/tools/javac/processing/model/completionfailure/SymbolsDontCumulate.java
--- a/test/langtools/tools/javac/processing/model/completionfailure/SymbolsDontCumulate.java	Thu Feb 28 10:28:34 2019 +0100
+++ b/test/langtools/tools/javac/processing/model/completionfailure/SymbolsDontCumulate.java	Fri Mar 01 10:15:04 2019 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,25 +24,31 @@
 /*
  * @test
  * @bug 8209055
- * @summary Verify that speculative symbols are not unnecesarily retained in
+ * @summary Verify that speculative symbols are not unnecessarily retained in
  *          the DeferredCompletionFailureHandler
  * @library /tools/javac/lib /tools/lib
  * @modules jdk.compiler/com.sun.tools.javac.api
  *          jdk.compiler/com.sun.tools.javac.code:+open
+ *          jdk.compiler/com.sun.tools.javac.main
  * @run main SymbolsDontCumulate
  */
 
 import java.lang.reflect.Field;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
 
 import javax.tools.JavaCompiler;
 import javax.tools.StandardJavaFileManager;
 import javax.tools.ToolProvider;
 
-import toolbox.*;
 import com.sun.tools.javac.api.JavacTaskImpl;
 import com.sun.tools.javac.code.DeferredCompletionFailureHandler;
 
+import toolbox.ToolBox;
+
 public class SymbolsDontCumulate {
     ToolBox tb = new ToolBox();
 
@@ -65,7 +71,7 @@
             DeferredCompletionFailureHandler h = DeferredCompletionFailureHandler.instance(((JavacTaskImpl) task).getContext());
             Field class2Flip = h.userCodeHandler.getClass().getDeclaredField("class2Flip");
             class2Flip.setAccessible(true);
-            int size = ((Map) class2Flip.get(h.userCodeHandler)).size();
+            int size = ((Map<?,?>) class2Flip.get(h.userCodeHandler)).size();
             assertEquals(0, size);
         }
     }