You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by rm...@apache.org on 2014/12/01 14:44:13 UTC

tomee git commit: for double check we need the var to be volatile

Repository: tomee
Updated Branches:
  refs/heads/tomee-1.7.x d568f5c43 -> 5b5782707


for double check we need the var to be volatile


Project: http://git-wip-us.apache.org/repos/asf/tomee/repo
Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/5b578270
Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/5b578270
Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/5b578270

Branch: refs/heads/tomee-1.7.x
Commit: 5b57827073365a9686cace49795d5a65a97a71e4
Parents: d568f5c
Author: Romain Manni-Bucau <rm...@apache.org>
Authored: Mon Dec 1 14:43:45 2014 +0100
Committer: Romain Manni-Bucau <rm...@apache.org>
Committed: Mon Dec 1 14:43:45 2014 +0100

----------------------------------------------------------------------
 .../main/java/org/apache/openejb/config/NewLoaderLogic.java    | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/5b578270/container/openejb-core/src/main/java/org/apache/openejb/config/NewLoaderLogic.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/config/NewLoaderLogic.java b/container/openejb-core/src/main/java/org/apache/openejb/config/NewLoaderLogic.java
index bf96ef6..8722f3f 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/config/NewLoaderLogic.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/config/NewLoaderLogic.java
@@ -58,8 +58,6 @@ import java.util.Set;
  */
 public class NewLoaderLogic {
 
-    private static final Object lock = new Object();
-
     private static final Logger logger = DeploymentLoader.logger;
     public static final String DEFAULT_EXCLUSIONS_ALIAS = "default-list";
     public static final String ADDITIONAL_EXCLUDES = SystemInstance.get().getOptions().get("openejb.additional.exclude", (String) null);
@@ -67,7 +65,7 @@ public class NewLoaderLogic {
     public static final String EXCLUSION_FILE = "exclusions.list";
 
     private static String[] exclusions;
-    private static Filter filter;
+    private static volatile Filter filter;
 
     public static UrlSet filterArchives(final Filter filter, final ClassLoader classLoader, UrlSet urlSet) {
 
@@ -303,7 +301,7 @@ public class NewLoaderLogic {
     @SuppressWarnings("unchecked")
     public static Filter getFilter() {
         if (filter == null) {
-            synchronized (lock) {
+            synchronized (NewLoaderLogic.class) {
                 if (filter == null) {
                     filter = new OptimizedExclusionFilter(getExclusions());
                 }