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

Fails for fields of type Class #17

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

Fails for fields of type Class #17

GoogleCodeExporter opened this issue Mar 29, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

If the tested class has a field like
private final Class<?> someType;
then an IllegalAccessError is thrown. 

It fails in Instantiator.intantiateObject(..) when it tries to create an
instance of type Class to fill the field with. It seems that Objenesis
can't create Class instances.

I had a quick view at the code, maybe adding an entry to prefabValues might
do the trick.



Original issue reported on code.google.com by [email protected] on 10 Jan 2010 at 1:00

Attachments:

@GoogleCodeExporter
Copy link
Author

Indeed you're right, I'll fix that in the next release.

In the mean time, you can add them to the prefab values manually:

EqualsVerifier.forClass(Simple.class)
    .withPrefabValues(Class.class, Class.class, Object.class)
    .verify();

Original comment by [email protected] on 11 Jan 2010 at 11:30

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

@GoogleCodeExporter
Copy link
Author

Original comment by [email protected] on 15 Jan 2010 at 8:32

  • 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