Fix FELIX-4386
Invalid synchronization of the component type description. The value is immutable.
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1559329 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/HandlerManagerFactory.java b/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/HandlerManagerFactory.java
index e94e843..5e83935 100644
--- a/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/HandlerManagerFactory.java
+++ b/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/HandlerManagerFactory.java
@@ -110,7 +110,7 @@
}
public String getFactoryName() {
- if (m_type != null && "composite".equals(m_type) && IPOJO_NAMESPACE.equals(m_namespace)) {
+ if ("composite".equals(m_type) && IPOJO_NAMESPACE.equals(m_namespace)) {
// Artificially change the factory name, to avoid name clash when we generate the instance name.
return m_namespace + ".composite:" + getName();
}
diff --git a/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/IPojoFactory.java b/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/IPojoFactory.java
index 1acfefc..ac99db6 100644
--- a/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/IPojoFactory.java
+++ b/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/IPojoFactory.java
@@ -367,7 +367,7 @@
* Gets the component type description.
* @return the component type description object. <code>Null</code> if not already computed.
*/
- public synchronized ComponentTypeDescription getComponentDescription() {
+ public ComponentTypeDescription getComponentDescription() {
return m_componentDesc;
}
@@ -376,7 +376,7 @@
* @return the component type description.
* @see org.apache.felix.ipojo.Factory#getDescription()
*/
- public synchronized Element getDescription() {
+ public Element getDescription() {
// Can be null, if not already computed.
if (m_componentDesc == null) {
return new Element("No description available for " + m_factoryName, "");