Signed-off-by: Jan Bartel <janb@webtide.com>
This commit is contained in:
parent
154e5ea1a5
commit
5056ac5895
|
@ -70,6 +70,7 @@ public class AnnotationParser
|
||||||
{
|
{
|
||||||
private static final Logger LOG = Log.getLogger(AnnotationParser.class);
|
private static final Logger LOG = Log.getLogger(AnnotationParser.class);
|
||||||
protected static int ASM_OPCODE_VERSION = Opcodes.ASM6; //compatibility of api
|
protected static int ASM_OPCODE_VERSION = Opcodes.ASM6; //compatibility of api
|
||||||
|
protected static String ASM_OPCODE_VERSION_STR = "ASM6";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Map of classnames scanned and the first location from which scan occurred
|
* Map of classnames scanned and the first location from which scan occurred
|
||||||
|
@ -87,12 +88,12 @@ public class AnnotationParser
|
||||||
int asmVersion = ASM_OPCODE_VERSION;
|
int asmVersion = ASM_OPCODE_VERSION;
|
||||||
Package asm = Opcodes.class.getPackage();
|
Package asm = Opcodes.class.getPackage();
|
||||||
if (asm == null)
|
if (asm == null)
|
||||||
LOG.warn("Unknown asm runtime version, assuming version {}", asmVersion);
|
LOG.warn("Unknown asm runtime version, assuming version {}", ASM_OPCODE_VERSION_STR);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
String s = asm.getImplementationVersion();
|
String s = asm.getImplementationVersion();
|
||||||
if (s==null)
|
if (s==null)
|
||||||
LOG.warn("Unknown asm implementation version, assuming version {}", asmVersion);
|
LOG.info("Unknown asm implementation version, assuming version {}", ASM_OPCODE_VERSION_STR);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int dot = s.indexOf('.');
|
int dot = s.indexOf('.');
|
||||||
|
@ -119,13 +120,13 @@ public class AnnotationParser
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
LOG.warn("Unrecognized runtime asm version, assuming {}", asmVersion);
|
LOG.warn("Unrecognized runtime asm version, assuming {}", ASM_OPCODE_VERSION_STR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (NumberFormatException e)
|
catch (NumberFormatException e)
|
||||||
{
|
{
|
||||||
LOG.warn("Unable to parse runtime asm version, assuming version {}", asmVersion);
|
LOG.warn("Unable to parse runtime asm version, assuming version {}", ASM_OPCODE_VERSION_STR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue