From f3c6c7a93f5f94efe14cdc36c61032402624da18 Mon Sep 17 00:00:00 2001 From: hns Date: Mon, 28 Jul 2008 08:24:42 +0000 Subject: [PATCH] Make app.addRepository() synchronized to avoid memory race conditions. --- src/helma/framework/core/ApplicationBean.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helma/framework/core/ApplicationBean.java b/src/helma/framework/core/ApplicationBean.java index 1b638b89..6f536230 100644 --- a/src/helma/framework/core/ApplicationBean.java +++ b/src/helma/framework/core/ApplicationBean.java @@ -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();