File tree Expand file tree Collapse file tree
core-java-modules/core-java-jvm
src/test/java/com/baeldung/bytecode Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6666 <artifactId >bcel</artifactId >
6767 <version >6.4.1</version >
6868 </dependency >
69- <dependency >
70- <groupId >cglib</groupId >
71- <artifactId >cglib</artifactId >
72- <version >3.3.0</version >
73- </dependency >
7469 <dependency >
7570 <groupId >org.javassist</groupId >
7671 <artifactId >javassist</artifactId >
Original file line number Diff line number Diff line change 22
33import static org .junit .Assert .assertTrue ;
44import static org .junit .jupiter .api .Assertions .assertEquals ;
5+
56import java .io .IOException ;
67import java .io .PrintWriter ;
78import java .io .StringWriter ;
9+
810import org .apache .bcel .Repository ;
911import org .apache .bcel .classfile .JavaClass ;
1012import org .junit .Test ;
1315import javassist .ClassPool ;
1416import javassist .NotFoundException ;
1517import javassist .bytecode .ClassFile ;
16- import net .sf .cglib .reflect .FastClass ;
1718
1819public class ViewBytecodeUnitTest {
1920
@@ -36,14 +37,6 @@ public void whenUsingBCEL_thenReadBytecode() throws ClassNotFoundException {
3637 assertTrue (objectClazz .toString ().contains ("public class java.lang.Object" ));
3738 }
3839
39- @ Test
40- public void whenUsingCglib_thenReadBytecode () {
41- FastClass fastClass = FastClass .create (java .lang .Object .class );
42- Class <?> clazz = fastClass .getJavaClass ();
43-
44- assertEquals (clazz .toString (), "class java.lang.Object" );
45- }
46-
4740 @ Test
4841 public void whenUsingJavassist_thenReadBytecode () throws NotFoundException {
4942 ClassPool cp = ClassPool .getDefault ();
You can’t perform that action at this time.
0 commit comments