8209535: [JVMCI] Do not swallow NoClassDefFoundError when converting JVMCI methods and fields to reflection objects
Reviewed-by: kvn, iveresov
--- a/src/hotspot/.mx.jvmci/suite.py Thu Aug 16 09:09:18 2018 +0200
+++ b/src/hotspot/.mx.jvmci/suite.py Thu Aug 16 09:46:09 2018 +0200
@@ -43,7 +43,8 @@
"jdk.vm.ci.services" : {
"subDir" : "../jdk.internal.vm.ci/share/classes",
"sourceDirs" : ["src"],
- "javaCompliance" : "9",
+ "javaCompliance" : "9+",
+ "checkstyleVersion" : "8.8",
"workingSets" : "API,JVMCI",
},
@@ -53,7 +54,7 @@
"subDir" : "../jdk.internal.vm.ci/share/classes",
"sourceDirs" : ["src"],
"checkstyle" : "jdk.vm.ci.services",
- "javaCompliance" : "9",
+ "javaCompliance" : "9+",
"workingSets" : "API,JVMCI",
},
@@ -61,7 +62,7 @@
"subDir" : "../jdk.internal.vm.ci/share/classes",
"sourceDirs" : ["src"],
"checkstyle" : "jdk.vm.ci.services",
- "javaCompliance" : "9",
+ "javaCompliance" : "9+",
"workingSets" : "API,JVMCI",
},
@@ -70,7 +71,7 @@
"sourceDirs" : ["src"],
"dependencies" : ["jdk.vm.ci.meta"],
"checkstyle" : "jdk.vm.ci.services",
- "javaCompliance" : "9",
+ "javaCompliance" : "9+",
"workingSets" : "API,JVMCI",
},
@@ -85,7 +86,7 @@
"jdk.vm.ci.hotspot",
],
"checkstyle" : "jdk.vm.ci.services",
- "javaCompliance" : "9",
+ "javaCompliance" : "9+",
"workingSets" : "API,JVMCI",
},
@@ -97,7 +98,7 @@
"jdk.vm.ci.services",
],
"checkstyle" : "jdk.vm.ci.services",
- "javaCompliance" : "9",
+ "javaCompliance" : "9+",
"workingSets" : "API,JVMCI",
},
@@ -110,7 +111,7 @@
"jdk.vm.ci.runtime",
],
"checkstyle" : "jdk.vm.ci.services",
- "javaCompliance" : "9",
+ "javaCompliance" : "9+",
"workingSets" : "API,JVMCI",
},
@@ -121,7 +122,7 @@
"sourceDirs" : ["src"],
"dependencies" : ["jdk.vm.ci.code"],
"checkstyle" : "jdk.vm.ci.services",
- "javaCompliance" : "9",
+ "javaCompliance" : "9+",
"workingSets" : "JVMCI,AArch64",
},
@@ -130,7 +131,7 @@
"sourceDirs" : ["src"],
"dependencies" : ["jdk.vm.ci.code"],
"checkstyle" : "jdk.vm.ci.services",
- "javaCompliance" : "9",
+ "javaCompliance" : "9+",
"workingSets" : "JVMCI,AMD64",
},
@@ -139,7 +140,7 @@
"sourceDirs" : ["src"],
"dependencies" : ["jdk.vm.ci.code"],
"checkstyle" : "jdk.vm.ci.services",
- "javaCompliance" : "9",
+ "javaCompliance" : "9+",
"workingSets" : "JVMCI,SPARC",
},
@@ -156,7 +157,7 @@
"jdk.internal.org.objectweb.asm",
],
"checkstyle" : "jdk.vm.ci.services",
- "javaCompliance" : "9",
+ "javaCompliance" : "9+",
"workingSets" : "JVMCI",
},
@@ -168,7 +169,7 @@
"jdk.vm.ci.hotspot",
],
"checkstyle" : "jdk.vm.ci.services",
- "javaCompliance" : "9",
+ "javaCompliance" : "9+",
"workingSets" : "API,JVMCI",
},
@@ -180,7 +181,7 @@
"jdk.vm.ci.hotspot",
],
"checkstyle" : "jdk.vm.ci.services",
- "javaCompliance" : "9",
+ "javaCompliance" : "9+",
"workingSets" : "JVMCI,HotSpot,AArch64",
},
@@ -192,7 +193,7 @@
"jdk.vm.ci.hotspot",
],
"checkstyle" : "jdk.vm.ci.services",
- "javaCompliance" : "9",
+ "javaCompliance" : "9+",
"workingSets" : "JVMCI,HotSpot,AMD64",
},
@@ -204,7 +205,7 @@
"jdk.vm.ci.hotspot",
],
"checkstyle" : "jdk.vm.ci.services",
- "javaCompliance" : "9",
+ "javaCompliance" : "9+",
"workingSets" : "JVMCI,HotSpot,SPARC",
},
--- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstantPool.java Thu Aug 16 09:09:18 2018 +0200
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstantPool.java Thu Aug 16 09:46:09 2018 +0200
@@ -647,20 +647,22 @@
}
/*
- * Converts a raw index from the bytecodes to a constant pool index
- * (not a cache index).
+ * Converts a raw index from the bytecodes to a constant pool index (not a cache index).
*
* @param rawIndex index from the bytecode
+ *
* @param opcode bytecode to convert the index for
+ *
* @return constant pool index
*/
- public int rawIndexToConstantPoolIndex(int index, int opcode) {
- if (isInvokedynamicIndex(index)) {
+ public int rawIndexToConstantPoolIndex(int rawIndex, int opcode) {
+ int index;
+ if (isInvokedynamicIndex(rawIndex)) {
assert opcode == Bytecodes.INVOKEDYNAMIC;
- index = decodeInvokedynamicIndex(index) + config().constantPoolCpCacheIndexTag;
+ index = decodeInvokedynamicIndex(rawIndex) + config().constantPoolCpCacheIndexTag;
} else {
assert opcode != Bytecodes.INVOKEDYNAMIC;
- index = rawIndexToConstantPoolCacheIndex(index, opcode);
+ index = rawIndexToConstantPoolCacheIndex(rawIndex, opcode);
}
return compilerToVM().constantPoolRemapInstructionOperandFromCache(this, index);
}
@@ -772,19 +774,20 @@
}
/**
- * Check for a resolved dynamic adapter method at the specified index,
- * resulting from either a resolved invokedynamic or invokevirtual on a signature polymorphic
- * MethodHandle method (HotSpot invokehandle).
+ * Check for a resolved dynamic adapter method at the specified index, resulting from either a
+ * resolved invokedynamic or invokevirtual on a signature polymorphic MethodHandle method
+ * (HotSpot invokehandle).
*
* @param cpi the constant pool index
* @param opcode the opcode of the instruction for which the lookup is being performed
- * @return {@code true} if a signature polymorphic method reference was found, otherwise {@code false}
+ * @return {@code true} if a signature polymorphic method reference was found, otherwise
+ * {@code false}
*/
public boolean isResolvedDynamicInvoke(int cpi, int opcode) {
if (Bytecodes.isInvokeHandleAlias(opcode)) {
final int methodRefCacheIndex = rawIndexToConstantPoolCacheIndex(cpi, opcode);
assert checkTag(compilerToVM().constantPoolRemapInstructionOperandFromCache(this, methodRefCacheIndex), JVM_CONSTANT.MethodRef);
- int op = compilerToVM().isResolvedInvokeHandleInPool(this, methodRefCacheIndex);
+ int op = compilerToVM().isResolvedInvokeHandleInPool(this, methodRefCacheIndex);
return op == opcode;
}
return false;
--- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstantPoolObject.java Thu Aug 16 09:09:18 2018 +0200
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstantPoolObject.java Thu Aug 16 09:46:09 2018 +0200
@@ -23,11 +23,10 @@
package jdk.vm.ci.hotspot;
import jdk.vm.ci.meta.JavaConstant;
-import jdk.vm.ci.meta.ResolvedJavaType;
/**
- * Represents a constant that was retrieved from a constant pool.
- * Used to keep track of the constant pool slot for the constant.
+ * Represents a constant that was retrieved from a constant pool. Used to keep track of the constant
+ * pool slot for the constant.
*/
public final class HotSpotConstantPoolObject extends HotSpotObjectConstantImpl {
@@ -36,14 +35,19 @@
}
public static JavaConstant forObject(HotSpotResolvedObjectType type, int cpi, JavaConstant object) {
- return forObject(type, cpi, ((HotSpotObjectConstantImpl)object).object());
+ return forObject(type, cpi, ((HotSpotObjectConstantImpl) object).object());
}
private final HotSpotResolvedObjectType type;
private final int cpi;
- public HotSpotResolvedObjectType getCpType() { return type; }
- public int getCpi() { return cpi; }
+ public HotSpotResolvedObjectType getCpType() {
+ return type;
+ }
+
+ public int getCpi() {
+ return cpi;
+ }
HotSpotConstantPoolObject(HotSpotResolvedObjectType type, int cpi, Object object) {
super(object, false);
--- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIMetaAccessContext.java Thu Aug 16 09:09:18 2018 +0200
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIMetaAccessContext.java Thu Aug 16 09:46:09 2018 +0200
@@ -145,7 +145,7 @@
}
}
- private final ClassValue<WeakReference<ResolvedJavaType>> resolvedJavaType = new ClassValue<WeakReference<ResolvedJavaType>>() {
+ private final ClassValue<WeakReference<ResolvedJavaType>> resolvedJavaType = new ClassValue<>() {
@Override
protected WeakReference<ResolvedJavaType> computeValue(Class<?> type) {
return new WeakReference<>(createClass(type));
@@ -164,10 +164,9 @@
javaType = type.get();
if (javaType == null) {
/*
- * If the referent has become null, clear out the current value
- * and let computeValue above create a new value. Reload the
- * value in a loop because in theory the WeakReference referent
- * can be reclaimed at any point.
+ * If the referent has become null, clear out the current value and let computeValue
+ * above create a new value. Reload the value in a loop because in theory the
+ * WeakReference referent can be reclaimed at any point.
*/
resolvedJavaType.remove(javaClass);
}
--- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIRuntime.java Thu Aug 16 09:09:18 2018 +0200
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIRuntime.java Thu Aug 16 09:46:09 2018 +0200
@@ -363,44 +363,44 @@
*/
public Predicate<ResolvedJavaType> getIntrinsificationTrustPredicate(Class<?>... compilerLeafClasses) {
if (intrinsificationTrustPredicate == null) {
- intrinsificationTrustPredicate = new Predicate<ResolvedJavaType>() {
- @Override
- public boolean test(ResolvedJavaType type) {
- if (type instanceof HotSpotResolvedJavaType) {
- Class<?> mirror = getMirror((HotSpotResolvedJavaType) type);
- Module module = mirror.getModule();
- return getTrustedModules().contains(module);
- } else {
- return false;
- }
+ intrinsificationTrustPredicate = new Predicate<>() {
+ @Override
+ public boolean test(ResolvedJavaType type) {
+ if (type instanceof HotSpotResolvedJavaType) {
+ Class<?> mirror = getMirror(type);
+ Module module = mirror.getModule();
+ return getTrustedModules().contains(module);
+ } else {
+ return false;
}
+ }
- private volatile Set<Module> trustedModules;
+ private volatile Set<Module> trustedModules;
- private Set<Module> getTrustedModules() {
- Set<Module> modules = trustedModules;
- if (modules == null) {
- modules = new HashSet<>();
- for (Class<?> compilerConfiguration : compilerLeafClasses) {
- Module compilerConfigurationModule = compilerConfiguration.getModule();
- if (compilerConfigurationModule.getDescriptor().isAutomatic()) {
- throw new IllegalArgumentException(String.format("The module '%s' defining the Graal compiler configuration class '%s' must not be an automatic module",
- compilerConfigurationModule.getName(), compilerConfiguration.getClass().getName()));
- }
- modules.add(compilerConfigurationModule);
- for (Requires require : compilerConfigurationModule.getDescriptor().requires()) {
- for (Module module : compilerConfigurationModule.getLayer().modules()) {
- if (module.getName().equals(require.name())) {
- modules.add(module);
- }
+ private Set<Module> getTrustedModules() {
+ Set<Module> modules = trustedModules;
+ if (modules == null) {
+ modules = new HashSet<>();
+ for (Class<?> compilerConfiguration : compilerLeafClasses) {
+ Module compilerConfigurationModule = compilerConfiguration.getModule();
+ if (compilerConfigurationModule.getDescriptor().isAutomatic()) {
+ throw new IllegalArgumentException(String.format("The module '%s' defining the Graal compiler configuration class '%s' must not be an automatic module",
+ compilerConfigurationModule.getName(), compilerConfiguration.getClass().getName()));
+ }
+ modules.add(compilerConfigurationModule);
+ for (Requires require : compilerConfigurationModule.getDescriptor().requires()) {
+ for (Module module : compilerConfigurationModule.getLayer().modules()) {
+ if (module.getName().equals(require.name())) {
+ modules.add(module);
}
}
}
- trustedModules = modules;
}
- return modules;
+ trustedModules = modules;
}
- };
+ return modules;
+ }
+ };
}
return intrinsificationTrustPredicate;
}
@@ -413,6 +413,7 @@
* does not support mapping {@link ResolvedJavaType} instances to {@link Class}
* instances
*/
+ @SuppressWarnings("static-method")
public Class<?> getMirror(ResolvedJavaType type) {
return ((HotSpotResolvedJavaType) type).mirror();
}
@@ -654,6 +655,7 @@
*
* @return the offset in bytes
*/
+ @SuppressWarnings("static-method")
public int getArrayBaseOffset(JavaKind kind) {
switch (kind) {
case Boolean:
@@ -685,6 +687,7 @@
*
* @return the scale in order to convert the index into a byte offset
*/
+ @SuppressWarnings("static-method")
public int getArrayIndexScale(JavaKind kind) {
switch (kind) {
case Boolean:
@@ -759,6 +762,7 @@
* {@code clazz} is already linked or the SVM JVMCI library does not contain a
* JNI-compliant symbol for a native method in {@code clazz}
*/
+ @SuppressWarnings({"static-method", "unused"})
public void registerNativeMethods(Class<?> clazz) {
throw new UnsatisfiedLinkError("SVM library is not available");
}
--- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaFieldImpl.java Thu Aug 16 09:09:18 2018 +0200
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaFieldImpl.java Thu Aug 16 09:46:09 2018 +0200
@@ -191,7 +191,7 @@
}
try {
return holder.mirror().getDeclaredField(getName());
- } catch (NoSuchFieldException | NoClassDefFoundError e) {
+ } catch (NoSuchFieldException e) {
return null;
}
}
--- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaMethodImpl.java Thu Aug 16 09:09:18 2018 +0200
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaMethodImpl.java Thu Aug 16 09:46:09 2018 +0200
@@ -73,7 +73,13 @@
private final HotSpotSignature signature;
private HotSpotMethodData methodData;
private byte[] code;
- private Executable toJavaCache;
+
+ /**
+ * Cache for {@link #toJava()}. Set to {@link #signature} when resolving reflection object fails
+ * due to reflection filtering (see {@code Reflection.fieldFilterMap} and
+ * {@code Reflection.methodFilterMap}).
+ */
+ private Object toJavaCache;
/**
* Only 30% of {@link HotSpotResolvedJavaMethodImpl}s have their name accessed so compute it
@@ -322,7 +328,8 @@
}
/**
- * Sets flags on {@code method} indicating that it should never be inlined or compiled by the VM.
+ * Sets flags on {@code method} indicating that it should never be inlined or compiled by the
+ * VM.
*/
@Override
public void setNotInlinableOrCompilable() {
@@ -581,25 +588,33 @@
private Executable toJava() {
if (toJavaCache != null) {
- return toJavaCache;
+ if (toJavaCache == signature) {
+ return null;
+ }
+ return (Executable) toJavaCache;
}
- try {
- Class<?>[] parameterTypes = signatureToTypes();
- Class<?> returnType = ((HotSpotResolvedJavaType) getSignature().getReturnType(holder).resolve(holder)).mirror();
+ Class<?>[] parameterTypes = signatureToTypes();
+ Class<?> returnType = ((HotSpotResolvedJavaType) getSignature().getReturnType(holder).resolve(holder)).mirror();
- Executable result;
- if (isConstructor()) {
+ Executable result;
+ if (isConstructor()) {
+ try {
result = holder.mirror().getDeclaredConstructor(parameterTypes);
- } else {
- // Do not use Method.getDeclaredMethod() as it can return a bridge method
- // when this.isBridge() is false and vice versa.
- result = searchMethods(holder.mirror().getDeclaredMethods(), getName(), returnType, parameterTypes);
+ } catch (NoSuchMethodException e) {
+ toJavaCache = signature;
+ return null;
}
- toJavaCache = result;
- return result;
- } catch (NoSuchMethodException | NoClassDefFoundError e) {
- return null;
+ } else {
+ // Do not use Method.getDeclaredMethod() as it can return a bridge method
+ // when this.isBridge() is false and vice versa.
+ result = searchMethods(holder.mirror().getDeclaredMethods(), getName(), returnType, parameterTypes);
+ if (result == null) {
+ toJavaCache = signature;
+ return null;
+ }
}
+ toJavaCache = result;
+ return result;
}
@Override
@@ -746,7 +761,7 @@
* read the JVM_ACC_IS_OBSOLETE bit (or anything else) via the raw pointer as obsoleted methods
* are subject to clean up and deletion (see InstanceKlass::purge_previous_versions_internal).
*/
- private static final ClassValue<Map<Long, SpeculationLog>> SpeculationLogs = new ClassValue<Map<Long, SpeculationLog>>() {
+ private static final ClassValue<Map<Long, SpeculationLog>> SpeculationLogs = new ClassValue<>() {
@Override
protected Map<Long, SpeculationLog> computeValue(java.lang.Class<?> type) {
return new HashMap<>(4);
@@ -796,6 +811,7 @@
return compilerToVM().hasCompiledCodeForOSR(this, entryBCI, level);
}
+ @Override
public int methodIdnum() {
return UNSAFE.getChar(getConstMethod() + config().constMethodMethodIdnumOffset);
}
--- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedObjectTypeImpl.java Thu Aug 16 09:09:18 2018 +0200
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedObjectTypeImpl.java Thu Aug 16 09:46:09 2018 +0200
@@ -984,6 +984,7 @@
return UNSAFE.getInt(getMetaspaceKlass() + config().instanceKlassMiscFlagsOffset);
}
+ @Override
public boolean isAnonymous() {
return (getMiscFlags() & config().instanceKlassMiscIsAnonymous) != 0;
}
--- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotSignature.java Thu Aug 16 09:09:18 2018 +0200
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotSignature.java Thu Aug 16 09:46:09 2018 +0200
@@ -25,7 +25,6 @@
import java.util.ArrayList;
import java.util.List;
-import jdk.vm.ci.common.JVMCIError;
import jdk.vm.ci.meta.JavaKind;
import jdk.vm.ci.meta.JavaType;
import jdk.vm.ci.meta.ResolvedJavaType;
--- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/Assumptions.java Thu Aug 16 09:09:18 2018 +0200
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/Assumptions.java Thu Aug 16 09:46:09 2018 +0200
@@ -98,7 +98,7 @@
}
/**
- * An assumption that a given class has no subclasses implementing {@link Object#finalize()}).
+ * An assumption that a given class has no subclasses implementing {@code Object#finalize()}).
*/
public static final class NoFinalizableSubclass extends Assumption {
--- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.services/.checkstyle_checks.xml Thu Aug 16 09:09:18 2018 +0200
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.services/.checkstyle_checks.xml Thu Aug 16 09:46:09 2018 +0200
@@ -9,7 +9,6 @@
<property name="severity" value="error"/>
<module name="TreeWalker">
<property name="tabWidth" value="4"/>
- <module name="FileContentsHolder"/>
<module name="JavadocStyle">
<property name="checkHtml" value="false"/>
</module>
@@ -132,6 +131,66 @@
<property name="format" value="new (Hashtable|Vector|Stack|StringBuffer)[^\w]"/>
<property name="message" value="Don't use old synchronized collection classes"/>
</module>
+ <module name="SuppressionCommentFilter">
+ <property name="offCommentFormat" value="Checkstyle: stop constant name check"/>
+ <property name="onCommentFormat" value="Checkstyle: resume constant name check"/>
+ <property name="checkFormat" value="ConstantNameCheck"/>
+ <metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="Allow non-conforming constant names"/>
+ </module>
+ <module name="SuppressionCommentFilter">
+ <property name="offCommentFormat" value="Checkstyle: stop method name check"/>
+ <property name="onCommentFormat" value="Checkstyle: resume method name check"/>
+ <property name="checkFormat" value="MethodName"/>
+ <property name="checkC" value="false"/>
+ <metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="Disable method name checks"/>
+ </module>
+ <module name="SuppressionCommentFilter">
+ <property name="offCommentFormat" value="CheckStyle: stop parameter assignment check"/>
+ <property name="onCommentFormat" value="CheckStyle: resume parameter assignment check"/>
+ <property name="checkFormat" value="ParameterAssignment"/>
+ <property name="checkC" value="false"/>
+ <metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="Disable Parameter Assignment"/>
+ </module>
+ <module name="SuppressionCommentFilter">
+ <property name="offCommentFormat" value="Checkstyle: stop final variable check"/>
+ <property name="onCommentFormat" value="Checkstyle: resume final variable check"/>
+ <property name="checkFormat" value="FinalLocalVariable"/>
+ <metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="Disable final variable checks"/>
+ </module>
+ <module name="SuppressionCommentFilter">
+ <property name="offCommentFormat" value="Checkstyle: stop"/>
+ <property name="onCommentFormat" value="Checkstyle: resume"/>
+ <metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="Disable all checks"/>
+ </module>
+ <module name="SuppressionCommentFilter">
+ <property name="offCommentFormat" value="CheckStyle: stop inner assignment check"/>
+ <property name="onCommentFormat" value="CheckStyle: resume inner assignment check"/>
+ <property name="checkFormat" value="InnerAssignment"/>
+ <metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="Disable inner assignment checks"/>
+ </module>
+ <module name="SuppressionCommentFilter">
+ <property name="offCommentFormat" value="Checkstyle: stop field name check"/>
+ <property name="onCommentFormat" value="Checkstyle: resume field name check"/>
+ <property name="checkFormat" value="MemberName"/>
+ <property name="checkC" value="false"/>
+ <metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="Disable field name checks"/>
+ </module>
+ <module name="SuppressionCommentFilter">
+ <property name="offCommentFormat" value="CheckStyle: stop header check"/>
+ <property name="onCommentFormat" value="CheckStyle: resume header check"/>
+ <property name="checkFormat" value=".*Header"/>
+ <metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="Disable header checks"/>
+ </module>
+ <module name="SuppressionCommentFilter">
+ <property name="offCommentFormat" value="CheckStyle: stop line length check"/>
+ <property name="onCommentFormat" value="CheckStyle: resume line length check"/>
+ <property name="checkFormat" value="LineLength"/>
+ </module>
+ <module name="SuppressionCommentFilter">
+ <property name="offCommentFormat" value="CheckStyle: start generated"/>
+ <property name="onCommentFormat" value="CheckStyle: stop generated"/>
+ <property name="checkFormat" value=".*Name|.*LineLength|.*Header"/>
+ </module>
</module>
<module name="RegexpHeader">
<property name="header" value="/\*\n \* Copyright \(c\) (20[0-9][0-9], )?20[0-9][0-9], Oracle and/or its affiliates. All rights reserved.\n \* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.\n \*\n \* This code is free software; you can redistribute it and/or modify it\n \* under the terms of the GNU General Public License version 2 only, as\n \* published by the Free Software Foundation.\n \*\n \* This code is distributed in the hope that it will be useful, but WITHOUT\n \* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n \* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License\n \* version 2 for more details \(a copy is included in the LICENSE file that\n \* accompanied this code\).\n \*\n \* You should have received a copy of the GNU General Public License version\n \* 2 along with this work; if not, write to the Free Software Foundation,\n \* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.\n \*\n \* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA\n \* or visit www.oracle.com if you need additional information or have any\n \* questions.\n \*/\n"/>
@@ -145,69 +204,9 @@
<property name="lineSeparator" value="lf"/>
</module>
<module name="Translation"/>
- <module name="SuppressionCommentFilter">
- <property name="offCommentFormat" value="Checkstyle: stop constant name check"/>
- <property name="onCommentFormat" value="Checkstyle: resume constant name check"/>
- <property name="checkFormat" value="ConstantNameCheck"/>
- <metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="Allow non-conforming constant names"/>
- </module>
- <module name="SuppressionCommentFilter">
- <property name="offCommentFormat" value="Checkstyle: stop method name check"/>
- <property name="onCommentFormat" value="Checkstyle: resume method name check"/>
- <property name="checkFormat" value="MethodName"/>
- <property name="checkC" value="false"/>
- <metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="Disable method name checks"/>
- </module>
- <module name="SuppressionCommentFilter">
- <property name="offCommentFormat" value="CheckStyle: stop parameter assignment check"/>
- <property name="onCommentFormat" value="CheckStyle: resume parameter assignment check"/>
- <property name="checkFormat" value="ParameterAssignment"/>
- <property name="checkC" value="false"/>
- <metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="Disable Parameter Assignment"/>
- </module>
- <module name="SuppressionCommentFilter">
- <property name="offCommentFormat" value="Checkstyle: stop final variable check"/>
- <property name="onCommentFormat" value="Checkstyle: resume final variable check"/>
- <property name="checkFormat" value="FinalLocalVariable"/>
- <metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="Disable final variable checks"/>
- </module>
- <module name="SuppressionCommentFilter">
- <property name="offCommentFormat" value="Checkstyle: stop"/>
- <property name="onCommentFormat" value="Checkstyle: resume"/>
- <metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="Disable all checks"/>
- </module>
- <module name="SuppressionCommentFilter">
- <property name="offCommentFormat" value="CheckStyle: stop inner assignment check"/>
- <property name="onCommentFormat" value="CheckStyle: resume inner assignment check"/>
- <property name="checkFormat" value="InnerAssignment"/>
- <metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="Disable inner assignment checks"/>
- </module>
- <module name="SuppressionCommentFilter">
- <property name="offCommentFormat" value="Checkstyle: stop field name check"/>
- <property name="onCommentFormat" value="Checkstyle: resume field name check"/>
- <property name="checkFormat" value="MemberName"/>
- <property name="checkC" value="false"/>
- <metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="Disable field name checks"/>
- </module>
<module name="RegexpMultiline">
<metadata name="net.sf.eclipsecs.core.comment" value="illegal Windows line ending"/>
<property name="format" value="\r\n"/>
<property name="message" value="illegal Windows line ending"/>
</module>
- <module name="SuppressionCommentFilter">
- <property name="offCommentFormat" value="CheckStyle: stop header check"/>
- <property name="onCommentFormat" value="CheckStyle: resume header check"/>
- <property name="checkFormat" value=".*Header"/>
- <metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="Disable header checks"/>
- </module>
- <module name="SuppressionCommentFilter">
- <property name="offCommentFormat" value="CheckStyle: stop line length check"/>
- <property name="onCommentFormat" value="CheckStyle: resume line length check"/>
- <property name="checkFormat" value="LineLength"/>
- </module>
- <module name="SuppressionCommentFilter">
- <property name="offCommentFormat" value="CheckStyle: start generated"/>
- <property name="onCommentFormat" value="CheckStyle: stop generated"/>
- <property name="checkFormat" value=".*Name|.*LineLength|.*Header"/>
- </module>
</module>
--- a/test/hotspot/jtreg/compiler/jvmci/compilerToVM/AllocateCompileIdTest.java Thu Aug 16 09:09:18 2018 +0200
+++ b/test/hotspot/jtreg/compiler/jvmci/compilerToVM/AllocateCompileIdTest.java Thu Aug 16 09:46:09 2018 +0200
@@ -35,6 +35,7 @@
*
* @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ * sun.hotspot.parser.DiagnosticCommand
* sun.hotspot.WhiteBox$WhiteBoxPermission
* @run main/othervm -Xbootclasspath/a:.
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI