You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by cl...@apache.org on 2009/07/11 18:42:56 UTC

svn commit: r793198 - /felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/Pojoization.java

Author: clement
Date: Sat Jul 11 16:42:55 2009
New Revision: 793198

URL: http://svn.apache.org/viewvc?rev=793198&view=rev
Log:
Fix issue FELIX-1319.
The overriding detection badly interpret the 'name' attribute of instance declaration. However, instance declaration must not impact the overriding detected. So, now instances are skipped.

Modified:
    felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/Pojoization.java

Modified: felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/Pojoization.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/Pojoization.java?rev=793198&r1=793197&r2=793198&view=diff
==============================================================================
--- felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/Pojoization.java (original)
+++ felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/Pojoization.java Sat Jul 11 16:42:55 2009
@@ -294,10 +294,12 @@
         if (xml.isAnnotated()) {
             boolean toskip = false;
             for (int i = 0; !toskip && i < m_metadata.length; i++) {
-                if (m_metadata[i].containsAttribute("name")
+                if (! m_metadata[i].getName().equals("instance") // Only if its a component type definition, 
+                                                                 // so skip instance declaration 
+                        && m_metadata[i].containsAttribute("name")
                         && m_metadata[i].getAttribute("name").equalsIgnoreCase(xml.getElem().getAttribute("name"))) {
                     toskip = true;
-                    warn("The component " + xml.getElem().getAttribute("name") + " is overriden by the metadata file");
+                    warn("The component type " + xml.getElem().getAttribute("name") + " is overriden by the metadata file");
                 }
             }
             if (!toskip) {