BAEL-4049 - removed cglib

This commit is contained in:
Anshul BANSAL 2020-06-03 12:36:24 +03:00
parent 6d1ecdd735
commit 8623df615b
2 changed files with 2 additions and 14 deletions

View File

@ -66,11 +66,6 @@
<artifactId>bcel</artifactId>
<version>6.4.1</version>
</dependency>
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib</artifactId>
<version>3.3.0</version>
</dependency>
<dependency>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>

View File

@ -2,9 +2,11 @@ package com.baeldung.bytecode;
import static org.junit.Assert.assertTrue;
import static org.junit.jupiter.api.Assertions.assertEquals;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.StringWriter;
import org.apache.bcel.Repository;
import org.apache.bcel.classfile.JavaClass;
import org.junit.Test;
@ -13,7 +15,6 @@ import org.objectweb.asm.util.TraceClassVisitor;
import javassist.ClassPool;
import javassist.NotFoundException;
import javassist.bytecode.ClassFile;
import net.sf.cglib.reflect.FastClass;
public class ViewBytecodeUnitTest {
@ -36,14 +37,6 @@ public class ViewBytecodeUnitTest {
assertTrue(objectClazz.toString().contains("public class java.lang.Object"));
}
@Test
public void whenUsingCglib_thenReadBytecode() {
FastClass fastClass = FastClass.create(java.lang.Object.class);
Class<?> clazz = fastClass.getJavaClass();
assertEquals(clazz.toString(), "class java.lang.Object");
}
@Test
public void whenUsingJavassist_thenReadBytecode() throws NotFoundException {
ClassPool cp = ClassPool.getDefault();