Make app.addRepository() synchronized to avoid memory race conditions.

This commit is contained in:
hns 2008-07-28 08:24:42 +00:00
parent 01e8b5ccbd
commit f3c6c7a93f

View file

@ -137,7 +137,7 @@ public class ApplicationBean implements Serializable {
*
* @param obj the repository, relative or absolute path to the library.
*/
public void addRepository(Object obj) {
public synchronized void addRepository(Object obj) {
Resource current = app.getCurrentCodeResource();
Repository parent = current == null ?
null : current.getRepository().getRootRepository();