-
Notifications
You must be signed in to change notification settings - Fork 54
NoSuchFieldException: Property not found when declare private access modifier on getter method #174
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
Comments
…not found - because declared private access modifier on getter method.
…found when declared private access modifier on getter method
@SinaiNIN I have created a test case to try reproduce the issue. Feel free to create a PR into #175 branch with your test cases. @anotender I think that not throwing exceptions like that will hide problems, i.e. when using wrong attribute name for introspection. It is better to fail fast to be aware of any such problems. These problems will go away when we accumulate good test coverage. |
@igdianov I've investigated a little bit the NoSuchFieldException that is thrown during startup with our app's entity model and here are my observations:
I am not able to reflect such issue in tests by amending the entity model. |
I have found out how Hibernate handles property and field access: https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessMixedImpl.java I think will modify the IntrospectionUtils to follow Hibernate property access resolution strategy. It should solve the problem. |
@anotender I had refactored persistent property detection in this PR: #173 Please, take a look and let me know if it resolves your issue. |
Fixed via #173 |
There is an error what throwing
NoSuchFieldException
when declareprivate
access modifier ongetter method
.Error
Example of Code
The text was updated successfully, but these errors were encountered: