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
What steps will reproduce the problem?
Run a JUnit test with the following body for the class attached. Body
"EqualsVerifier.forClass(ClassForEqualsVerifier.class).verify();"
What is the expected output? What do you see instead?
I expected a success message!!! Ok, I really expected an error which I can
understand by it message or by reading the error messages page, but instead I
get this "java.lang.AssertionError: net.sf.cglib.core.CodeGenerationException:
java.lang.reflect.InvocationTargetException-->null". I don't get a clue from
this!!
What version of the product are you using? On what operating system?
Version 1.0.2 on Ubuntu 11.04.
Please provide any additional information below.
I attached a java class which I think you will be able to reproduce the error.
As far I can get, the error is produce for the attribute of the type File.
Full stack trace from JUnit:
java.lang.AssertionError: net.sf.cglib.core.CodeGenerationException:
java.lang.reflect.InvocationTargetException-->null
For more information, go to:
http://code.google.com/p/equalsverifier/wiki/ErrorMessages
at nl.jqno.equalsverifier.util.Assert.fail(Assert.java:96)
at nl.jqno.equalsverifier.EqualsVerifier.handleError(EqualsVerifier.java:330)
at nl.jqno.equalsverifier.EqualsVerifier.verify(EqualsVerifier.java:316)
at com.jwt.tank.client.NewRequestCommandTest.equalsContractClassForEqualsVerifier(NewRequestCommandTest.java:239)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:73)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:46)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
I hope this is enough, but if you need additional information feel free to ask
for it.
Tanks,
Rodrigo.
Original issue reported on code.google.com by [email protected] on 3 Oct 2011 at 1:10
Hi Rodrigo,
Thanks for your detailed error report. The problem seems to be related to the
File class: the code generator that EqualsVerifier uses, is unable to create
instances of it. I will fix this in the next release.
Until then, you can work around the problem as follows:
EqualsVerifier.forClass(ClassForEqualsVerifier.class)
.withPrefabValues(File.class, new File(""), new File("/"))
.verify();
Original issue reported on code.google.com by
[email protected]
on 3 Oct 2011 at 1:10Attachments:
The text was updated successfully, but these errors were encountered: