Permalink
Browse files

Enabling ASM versions 5.2-7.0.

  • Loading branch information...
oshoukry committed Nov 24, 2018
1 parent 2088397 commit 9badbcc4593e797accfed5e51bec9f2b843f0f67
@@ -36,7 +36,7 @@
public class ByteCodeFactory {
private static final Logger LOGGER = LoggerFactory.getLogger(ByteCodeFactory.class);
private static final Version asm_min_version = VersionFactory.getVersion("5.0");
private static final Version asm_max_version = VersionFactory.getVersion("6.0");
private static final Version asm_max_version = VersionFactory.getVersion("7.0");
private static boolean asm_enabled = ASMDetector.getInstance().isASMLoaded();
private static Version asm_version = ASMDetector.getInstance().getVersion();
@@ -63,7 +63,7 @@ private static void verifyASMLoadedAndMatchesRequiredVersions() {
throw ASMNotLoadedException.getInstance("Incorrect version of ASM found, "
+ "expected versions between ["
+ asm_min_version.getVersion()
+ " and less than"
+ " and less than "
+ asm_max_version.getVersion()
+ "] found [" + asm_version.getVersion() + "]");
}
@@ -104,7 +104,7 @@ public void shouldGetEmptyStringForOpenPojoClasses() {
@Test
public void shouldGetASMVersion() {
final Version version = getImplementationVersion(ClassUtil.loadClass(ASMDetector.ASM_CLASS_NAME));
assertThat(version.getVersion(), startsWith("5."));
assertThat(version.getVersion(), Matchers.anyOf(startsWith("5."), startsWith("6."), startsWith("7.")));
}
@Test

0 comments on commit 9badbcc

Please sign in to comment.