95 ignore("com/sun/tools/classfile/Dependencies$DefaultFilter", "instance"); 96 ignore("com/sun/tools/javap/JavapTask", "versionRB"); 97 ignore("com/sun/tools/doclets/formats/html/HtmlDoclet", "docletToStart"); 98 ignore("com/sun/tools/javac/util/JCDiagnostic", "fragmentFormatter"); 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/JDK9Wrappers$Configuration", 110 "resolveRequiresAndUsesMethod", "configurationClass"); 111 ignore("com/sun/tools/javac/util/JDK9Wrappers$Layer", 112 "bootMethod", "defineModulesWithOneLoaderMethod", "configurationMethod", "layerClass"); 113 ignore("com/sun/tools/javac/util/JDK9Wrappers$Module", 114 "addExportsMethod", "addUsesMethod", "getModuleMethod", "getUnnamedModuleMethod"); 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 ignore("com/sun/tools/javac/util/JDK9Wrappers$JmodFile", 122 "jmodFileClass", "checkMagicMethod"); 123 } 124 125 private final List<String> errors = new ArrayList<>(); 126 127 public static void main(String[] args) { 128 try { 129 new DetectMutableStaticFields().run(); 130 } catch (Exception ex) { 131 throw new AssertionError("Exception during test execution: " + ex, ex); 132 } 133 } 134 | 95 ignore("com/sun/tools/classfile/Dependencies$DefaultFilter", "instance"); 96 ignore("com/sun/tools/javap/JavapTask", "versionRB"); 97 ignore("com/sun/tools/doclets/formats/html/HtmlDoclet", "docletToStart"); 98 ignore("com/sun/tools/javac/util/JCDiagnostic", "fragmentFormatter"); 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/JDK9Wrappers$Configuration", 110 "resolveRequiresAndUsesMethod", "configurationClass"); 111 ignore("com/sun/tools/javac/util/JDK9Wrappers$Layer", 112 "bootMethod", "defineModulesWithOneLoaderMethod", "configurationMethod", "layerClass"); 113 ignore("com/sun/tools/javac/util/JDK9Wrappers$Module", 114 "addExportsMethod", "addUsesMethod", "getModuleMethod", "getUnnamedModuleMethod"); 115 ignore("com/sun/tools/javac/util/JDK9Wrappers$ModuleDescriptor$Version", 116 "versionClass", "parseMethod"); 117 ignore("com/sun/tools/javac/util/JDK9Wrappers$ModuleFinder", 118 "moduleFinderClass", "ofMethod"); 119 ignore("com/sun/tools/javac/util/JDK9Wrappers$ServiceLoaderHelper", 120 "loadMethod"); 121 ignore("com/sun/tools/javac/util/JDK9Wrappers$VMHelper", 122 "vmClass", "getRuntimeArgumentsMethod"); 123 ignore("com/sun/tools/javac/util/JDK9Wrappers$JmodFile", 124 "jmodFileClass", "checkMagicMethod"); 125 } 126 127 private final List<String> errors = new ArrayList<>(); 128 129 public static void main(String[] args) { 130 try { 131 new DetectMutableStaticFields().run(); 132 } catch (Exception ex) { 133 throw new AssertionError("Exception during test execution: " + ex, ex); 134 } 135 } 136 |