[ https://issues.apache.org/jira/browse/JXPATH-152?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13215899#comment-13215899 ]
Matt Benson edited comment on JXPATH-152 at 2/24/12 8:57 PM: ------------------------------------------------------------- It would seem that synchronizing each {{HashMap#put()}} call against the target map would defend against the worst-case scenarios you suggest. Thanks for the report! {quote} Committed revision 1293412. {quote} was (Author: mbenson): It would seem that synchronizing access to the {{HashMap}}s' {{#put}} calls would defend against the worst-case scenarios you suggest. Thanks for the report! {quote} Committed revision 1293412. {quote} > Concurrent access on hashmap of JXPathIntrospector > -------------------------------------------------- > > Key: JXPATH-152 > URL: https://issues.apache.org/jira/browse/JXPATH-152 > Project: Commons JXPath > Issue Type: Bug > Affects Versions: 1.3 > Environment: Java5, Windows/AIX > Reporter: pleutre > Assignee: Matt Benson > Priority: Minor > Fix For: 1.4 > > Original Estimate: 24h > Remaining Estimate: 24h > > JXPathIntrospector.registerDynamicClass method can be called in static part > of classes. > If two classes A & B try to registerDynamicClass in the same time a > concurrent access exception can append on hashmap of JXPathIntrospector. > Replace hashmap by concurrent hashmap or synchronized access to these > hashmaps. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira