[jira] [Commented] (WICKET-5252) PropertyResolver breaks immutable objects by calling setAccessible
[ https://issues.apache.org/jira/browse/WICKET-5252?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13693812#comment-13693812 ] Martin Grigorov commented on WICKET-5252: - Then why you use such object in a (property)model ?! This is not a problem of Wicket. Wicket doesn't know of/use your objects unless you tell it. PropertyResolver breaks immutable objects by calling setAccessible -- Key: WICKET-5252 URL: https://issues.apache.org/jira/browse/WICKET-5252 Project: Wicket Issue Type: Bug Affects Versions: 6.8.0 Reporter: Daniel Zwicker If a Bean only have private fields and no setter this object is immutable. The decision to implement such an object has a bunch of implications. e.g. it is thread safe, you can take snapshots of these object to store a version history and so on. Now your use of reflection breaks this isolation silently. I believe if somebody want set the values of the object he should implement a setter or provide a public field. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (WICKET-5252) PropertyResolver breaks immutable objects by calling setAccessible
[ https://issues.apache.org/jira/browse/WICKET-5252?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13693816#comment-13693816 ] Daniel Zwicker commented on WICKET-5252: I know that wicket doesn't know how to use my object. But i would expect an exception in the case that wicket want to set a property and this property is not accessible. So i get aware of this situation and can think about the solution. But just accessing this private field should not be the decision of wicket. As -you are right- can't know how to use my objects. PropertyResolver breaks immutable objects by calling setAccessible -- Key: WICKET-5252 URL: https://issues.apache.org/jira/browse/WICKET-5252 Project: Wicket Issue Type: Bug Affects Versions: 6.8.0 Reporter: Daniel Zwicker If a Bean only have private fields and no setter this object is immutable. The decision to implement such an object has a bunch of implications. e.g. it is thread safe, you can take snapshots of these object to store a version history and so on. Now your use of reflection breaks this isolation silently. I believe if somebody want set the values of the object he should implement a setter or provide a public field. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (WICKET-5252) PropertyResolver breaks immutable objects by calling setAccessible
[ https://issues.apache.org/jira/browse/WICKET-5252?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13693829#comment-13693829 ] Daniel Zwicker commented on WICKET-5252: Hm. Ok. I will tell my team to refactor all places the PropertyModel is used. But i believe this i a huge problem. Every tutorial for wicket told you to use this PropertyModel! And there is no remark about this behavior! Perhaps you understand the problem with this more when i told you what happen in our project. We have these immutable object. Everybody in the backend team knows these object. Now in the Frontendteam used new AjaxCheckBox(marker). So. I have told him the cause of our bug and he directly respond args immutable.. Sorry. Perhaps a solution would be a configuration switch to configure PropertyResolver to throw exceptions in these cases. So everybody can pay attention to this. PropertyResolver breaks immutable objects by calling setAccessible -- Key: WICKET-5252 URL: https://issues.apache.org/jira/browse/WICKET-5252 Project: Wicket Issue Type: Bug Affects Versions: 6.8.0 Reporter: Daniel Zwicker If a Bean only have private fields and no setter this object is immutable. The decision to implement such an object has a bunch of implications. e.g. it is thread safe, you can take snapshots of these object to store a version history and so on. Now your use of reflection breaks this isolation silently. I believe if somebody want set the values of the object he should implement a setter or provide a public field. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (WICKET-5252) PropertyResolver breaks immutable objects by calling setAccessible
[ https://issues.apache.org/jira/browse/WICKET-5252?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13693833#comment-13693833 ] Martin Grigorov commented on WICKET-5252: - Well, I cannot help with other people's tutorials. But we can improve Wicket's javadocs. PropertyModel explains all this. We can extend PropertyResolver's javadoc as well. My training materials cover this and I explain that this may lead to problems when SecuriyManager is in use. Feel free to open a new ticket for the new setting. PropertyResolver breaks immutable objects by calling setAccessible -- Key: WICKET-5252 URL: https://issues.apache.org/jira/browse/WICKET-5252 Project: Wicket Issue Type: Bug Affects Versions: 6.8.0 Reporter: Daniel Zwicker If a Bean only have private fields and no setter this object is immutable. The decision to implement such an object has a bunch of implications. e.g. it is thread safe, you can take snapshots of these object to store a version history and so on. Now your use of reflection breaks this isolation silently. I believe if somebody want set the values of the object he should implement a setter or provide a public field. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira