1. opensymphony
  2. xwork

Commits

mrdon  committed 2383287

Fixing possible sync issue with the spring class cache
XW-573

git-svn-id: http://svn.opensymphony.com/svn/xwork/branches/2.0@1624e221344d-f017-0410-9bd5-d282ab1896d7

  • Participants
  • Parent commits d0654a3
  • Branches 2.0, xwork_2_0_7

Comments (0)

Files changed (1)

File src/java/com/opensymphony/xwork2/spring/SpringObjectFactory.java

View file
  • Ignore whitespace
 
 import java.util.HashMap;
 import java.util.Map;
+import java.util.Collections;
 
 /**
  * Simple implementation of the ObjectFactory that makes use of Spring's application context if one has been configured,
     protected ApplicationContext appContext;
     protected AutowireCapableBeanFactory autoWiringFactory;
     protected int autowireStrategy = AutowireCapableBeanFactory.AUTOWIRE_BY_NAME;
-    private Map classes = new HashMap();
+    private Map classes = Collections.synchronizedMap(new HashMap());
     private boolean useClassCache = true;
 
     @Inject(value="applicationContextPath",required=false)