< prev index next >

langtools/test/tools/javac/T8003967/DetectMutableStaticFields.java

Print this page




  99         ignore("com/sun/tools/javac/util/JavacMessages", "defaultBundle", "defaultMessages");
 100         ignore("com/sun/tools/javac/file/JRTIndex", "sharedInstance");
 101         ignore("com/sun/tools/javac/main/JavaCompiler", "versionRB");
 102         ignore("com/sun/tools/javac/code/Type", "moreInfo");
 103         ignore("com/sun/tools/javac/util/SharedNameTable", "freelist");
 104         ignore("com/sun/tools/javac/util/Log", "useRawMessages");
 105 
 106         // The following static fields are used for caches of information obtained
 107         // by reflective lookup, to avoid explicit references that are not available
 108         // when running javac on JDK 8.
 109         ignore("com/sun/tools/javac/util/ModuleHelper",
 110                 "addExportsMethod", "getModuleMethod", "getUnnamedModuleMethod");
 111         ignore("com/sun/tools/javac/util/JDK9Wrappers$Configuration",
 112                 "resolveRequiresAndUsesMethod", "configurationClass");
 113         ignore("com/sun/tools/javac/util/JDK9Wrappers$Layer",
 114                 "bootMethod", "defineModulesWithOneLoaderMethod", "configurationMethod", "layerClass");
 115         ignore("com/sun/tools/javac/util/JDK9Wrappers$ModuleFinder",
 116                 "moduleFinderClass", "ofMethod");
 117         ignore("com/sun/tools/javac/util/JDK9Wrappers$ServiceLoaderHelper",
 118                 "loadMethod");


 119     }
 120 
 121     private final List<String> errors = new ArrayList<>();
 122 
 123     public static void main(String[] args) {
 124         try {
 125             new DetectMutableStaticFields().run();
 126         } catch (Exception ex) {
 127             throw new AssertionError("Exception during test execution: " + ex, ex);
 128         }
 129     }
 130 
 131     private void run()
 132         throws
 133             IOException,
 134             ConstantPoolException,
 135             InvalidDescriptor,
 136             URISyntaxException {
 137 
 138         JavaCompiler tool = ToolProvider.getSystemJavaCompiler();




  99         ignore("com/sun/tools/javac/util/JavacMessages", "defaultBundle", "defaultMessages");
 100         ignore("com/sun/tools/javac/file/JRTIndex", "sharedInstance");
 101         ignore("com/sun/tools/javac/main/JavaCompiler", "versionRB");
 102         ignore("com/sun/tools/javac/code/Type", "moreInfo");
 103         ignore("com/sun/tools/javac/util/SharedNameTable", "freelist");
 104         ignore("com/sun/tools/javac/util/Log", "useRawMessages");
 105 
 106         // The following static fields are used for caches of information obtained
 107         // by reflective lookup, to avoid explicit references that are not available
 108         // when running javac on JDK 8.
 109         ignore("com/sun/tools/javac/util/ModuleHelper",
 110                 "addExportsMethod", "getModuleMethod", "getUnnamedModuleMethod");
 111         ignore("com/sun/tools/javac/util/JDK9Wrappers$Configuration",
 112                 "resolveRequiresAndUsesMethod", "configurationClass");
 113         ignore("com/sun/tools/javac/util/JDK9Wrappers$Layer",
 114                 "bootMethod", "defineModulesWithOneLoaderMethod", "configurationMethod", "layerClass");
 115         ignore("com/sun/tools/javac/util/JDK9Wrappers$ModuleFinder",
 116                 "moduleFinderClass", "ofMethod");
 117         ignore("com/sun/tools/javac/util/JDK9Wrappers$ServiceLoaderHelper",
 118                 "loadMethod");
 119         ignore("com/sun/tools/javac/util/JDK9Wrappers$VMHelper",
 120                 "vmClass", "getRuntimeArgumentsMethod");
 121     }
 122 
 123     private final List<String> errors = new ArrayList<>();
 124 
 125     public static void main(String[] args) {
 126         try {
 127             new DetectMutableStaticFields().run();
 128         } catch (Exception ex) {
 129             throw new AssertionError("Exception during test execution: " + ex, ex);
 130         }
 131     }
 132 
 133     private void run()
 134         throws
 135             IOException,
 136             ConstantPoolException,
 137             InvalidDescriptor,
 138             URISyntaxException {
 139 
 140         JavaCompiler tool = ToolProvider.getSystemJavaCompiler();


< prev index next >