Issue #2191 - JPMS Support.
Restored error message in case of wrong ASM version. Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
This commit is contained in:
parent
5cac3376c6
commit
76a9be8a82
|
@ -84,11 +84,12 @@ public class AnnotationParser
|
||||||
*/
|
*/
|
||||||
public static int asmVersion ()
|
public static int asmVersion ()
|
||||||
{
|
{
|
||||||
|
String asmString = "ASM6";
|
||||||
int asmVersion = ASM_OPCODE_VERSION;
|
int asmVersion = ASM_OPCODE_VERSION;
|
||||||
String version = ManifestUtils.getVersion(Opcodes.class).orElse(null);
|
String version = ManifestUtils.getVersion(Opcodes.class).orElse(null);
|
||||||
if (version == null)
|
if (version == null)
|
||||||
{
|
{
|
||||||
LOG.warn("Unknown ASM version, assuming {}", ASM_OPCODE_VERSION);
|
LOG.warn("Unknown ASM version, assuming {}", asmString);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -116,13 +117,13 @@ public class AnnotationParser
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
LOG.warn("Unrecognized ASM version, assuming {}", ASM_OPCODE_VERSION);
|
LOG.warn("Unrecognized ASM version, assuming {}", asmString);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (NumberFormatException e)
|
catch (NumberFormatException e)
|
||||||
{
|
{
|
||||||
LOG.warn("Unable to parse ASM version, assuming {}", ASM_OPCODE_VERSION);
|
LOG.warn("Unable to parse ASM version, assuming {}", asmString);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return asmVersion;
|
return asmVersion;
|
||||||
|
|
Loading…
Reference in New Issue