commit | 602fb43e148181f2a8b5cb869e9683f620b5d7c7 | [log] [tgz] |
---|---|---|
author | Karl Pauls <pauls@apache.org> | Tue Jan 15 21:20:25 2008 +0000 |
committer | Karl Pauls <pauls@apache.org> | Tue Jan 15 21:20:25 2008 +0000 |
tree | cee765b5b1e69d2cc165568fc39567f0f697c609 | |
parent | 9c7a2b60205c1358844ccf7f06136408ded79864 [diff] |
Try to fix a potential visibility issue on loading a class form a bundle where it seems to be possible that we create two classloaders instead of one. git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@612230 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/framework/src/main/java/org/apache/felix/framework/searchpolicy/ContentLoaderImpl.java b/framework/src/main/java/org/apache/felix/framework/searchpolicy/ContentLoaderImpl.java index 574e363..f2f0f14 100644 --- a/framework/src/main/java/org/apache/felix/framework/searchpolicy/ContentLoaderImpl.java +++ b/framework/src/main/java/org/apache/felix/framework/searchpolicy/ContentLoaderImpl.java
@@ -110,10 +110,13 @@ public Class getClass(String name) { - if (m_classLoader == null) + synchronized (this) { - m_classLoader = m_secureAction.createContentClassLoader(this, - m_protectionDomain); + if (m_classLoader == null) + { + m_classLoader = m_secureAction.createContentClassLoader(this, + m_protectionDomain); + } } try