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

PropertySupport: Make methods accessible prior to invocation #9

Open
deploynix opened this issue May 27, 2013 · 0 comments
Open

PropertySupport: Make methods accessible prior to invocation #9

deploynix opened this issue May 27, 2013 · 0 comments

Comments

@deploynix
Copy link

Mapping list elements like so:

assertThat(collection).onProperty("id").containsExactly(...)

May result in an IllegalAccessException if the elements of the collection are package-local (or otherwise restricted). This can even be the case if the collection contains package-local implementations of a public interface, i.e. in situations where a programmatic invocation of the getter works.

Invoking method#setAccessible(true) prior to invocation of the property set/get methods would resolve such issues.

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

No branches or pull requests

1 participant