mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[java] runtime ASM version detection (IDEA-191331)
This commit is contained in:
+5
-1
@@ -25,7 +25,11 @@ public class NotNullVerifyingInstrumenter extends ClassVisitor implements Opcode
|
||||
|
||||
@SuppressWarnings("SSBasedInspection") private static final String[] EMPTY_STRING_ARRAY = new String[0];
|
||||
|
||||
@SuppressWarnings("ConstantConditions") private static final boolean NEW_ASM = Opcodes.API_VERSION > Opcodes.ASM6;
|
||||
private static final boolean NEW_ASM;
|
||||
static {
|
||||
try { NEW_ASM = (Integer)Opcodes.class.getField("API_VERSION").get(null) > Opcodes.ASM6; }
|
||||
catch (Exception e) { throw new RuntimeException(e); }
|
||||
}
|
||||
|
||||
private final Map<String, Map<Integer, String>> myMethodParamNames;
|
||||
private String myClassName;
|
||||
|
||||
+5
-1
@@ -26,7 +26,11 @@ class PatternInstrumenter extends ClassVisitor implements Opcodes {
|
||||
static final String JAVA_UTIL_REGEX_PATTERN = "[Ljava/util/regex/Pattern;";
|
||||
static final String NULL_PATTERN = "((((";
|
||||
|
||||
@SuppressWarnings("ConstantConditions") static final boolean NEW_ASM = Opcodes.API_VERSION > Opcodes.ASM6;
|
||||
private static final boolean NEW_ASM;
|
||||
static {
|
||||
try { NEW_ASM = (Integer)Opcodes.class.getField("API_VERSION").get(null) > Opcodes.ASM6; }
|
||||
catch (Exception e) { throw new RuntimeException(e); }
|
||||
}
|
||||
|
||||
private final String myPatternAnnotationClassName;
|
||||
private final boolean myDoAssert;
|
||||
|
||||
Reference in New Issue
Block a user