You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The skip of finalize and final/static methods from the Object.class will cause an java.lang.IllegalArgumentException exception.
Test code snippet:
public void test_getMethod() throws IllegalArgumentException {
Class<?> clazz = Assertions.class;
FastClass fc = FastClass.create(clazz);
Method[] methods = clazz.getMethods();
for (Method m : methods) {
// throws "java.lang.IllegalArgumentException: Cannot find method public final void java.lang.Object.wait(long,int) throws java.lang.InterruptedException"
fc.getMethod(m);
}
}
Exception stack:
java.lang.IllegalArgumentException: Cannot find method public final void java.lang.Object.wait(long,int) throws java.lang.InterruptedException
at net.sf.cglib.reflect.FastMethod.helper(FastMethod.java:39)
at net.sf.cglib.reflect.FastMethod.<init>(FastMethod.java:28)
at net.sf.cglib.reflect.FastClass.getMethod(FastClass.java:104)
at net.sf.cglib.reflect.TestFastClass.test_getMethod(TestFastClass.java:677)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at junit.framework.TestCase.runTest(TestCase.java:176)
at junit.framework.TestCase.runBare(TestCase.java:141)
at junit.framework.TestResult$1.protect(TestResult.java:122)
at junit.framework.TestResult.runProtected(TestResult.java:142)
at junit.framework.TestResult.run(TestResult.java:125)
at junit.framework.TestCase.run(TestCase.java:129)
at junit.framework.TestSuite.runTest(TestSuite.java:252)
at junit.framework.TestSuite.run(TestSuite.java:247)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:86)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235)
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)
The text was updated successfully, but these errors were encountered:
jesesun
added a commit
to jesesun/cglib
that referenced
this issue
May 13, 2022
Background:
The latest cglib version contains a piece of code authored by @vlsi in the commit b4cd1d6.
Source code snippet:
Issue:
The skip of finalize and final/static methods from the Object.class will cause an java.lang.IllegalArgumentException exception.
Test code snippet:
Exception stack:
java.lang.IllegalArgumentException: Cannot find method public final void java.lang.Object.wait(long,int) throws java.lang.InterruptedException
The text was updated successfully, but these errors were encountered: