Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error not found in list. #49

Closed
GoogleCodeExporter opened this issue Mar 29, 2015 · 2 comments
Closed

Error not found in list. #49

GoogleCodeExporter opened this issue Mar 29, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

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

Attachments:

@GoogleCodeExporter
Copy link
Author

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 comment by [email protected] on 5 Oct 2011 at 6:39

  • Changed state: Accepted
  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

It's fixed. Version 1.1 is available now.

Original comment by [email protected] on 11 Feb 2012 at 11:49

  • Changed state: Fixed
  • Added labels: ****
  • Removed labels: ****

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant