[ https://issues.apache.org/jira/browse/MYFACES-2524?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12806489#action_12806489 ]
Jan-Kees van Andel commented on MYFACES-2524: --------------------------------------------- The only reason for this approach was performance, since final fields are automatically thread safe. The classloader makes sure it is. Most of the code should be quite performant, only: "Validation.buildDefaultValidatorFactory().getValidator();" is an issue. You don't want to invoke this beast on every request, since it bootstraps Bean Validation. I added it because of an issue raised by (I think) Mike Concini. I think a lazy initializing singleton is a good replacement. This way, you can change some settings before initialization happens. > Change ExternalSpecifications to enable using it in automated tests > ------------------------------------------------------------------- > > Key: MYFACES-2524 > URL: https://issues.apache.org/jira/browse/MYFACES-2524 > Project: MyFaces Core > Issue Type: Task > Affects Versions: 2.0.0-beta > Reporter: Jakob Korherr > Assignee: Jakob Korherr > > Currently ExternalSpecifications is using public static final fields to hold > the information if something is available or not (e.g. bean validation). > However, this is problematic for automated testing, because the value can not > be adapted for the test case (not even with reflection). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.