[java] runtime ASM version detection (IDEA-191331)

This commit is contained in:
Roman Shevchenko
2018-10-02 11:34:35 +02:00
parent c4a601c27f
commit dea7100fa8
@@ -26,7 +26,7 @@ class PatternInstrumenter extends ClassVisitor implements Opcodes {
static final String JAVA_UTIL_REGEX_PATTERN = "[Ljava/util/regex/Pattern;";
static final String NULL_PATTERN = "((((";
private static final boolean NEW_ASM;
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); }