felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From guilla...@apache.org
Subject svn commit: r1477146 - /felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/extender/internal/linker/ManagedType.java
Date Mon, 29 Apr 2013 15:20:33 GMT
Author: guillaume
Date: Mon Apr 29 15:20:33 2013
New Revision: 1477146

URL: http://svn.apache.org/r1477146
Log:
* TypeDeclaration was wrongly unbound, changed to InstanceDeclaration
* Clarified error messages

Modified:
    felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/extender/internal/linker/ManagedType.java

Modified: felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/extender/internal/linker/ManagedType.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/extender/internal/linker/ManagedType.java?rev=1477146&r1=1477145&r2=1477146&view=diff
==============================================================================
--- felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/extender/internal/linker/ManagedType.java
(original)
+++ felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/extender/internal/linker/ManagedType.java
Mon Apr 29 15:20:33 2013
@@ -289,15 +289,26 @@ public class ManagedType implements Fact
 
                             return instance;
                         } catch (UnacceptableConfiguration c) {
-                            m_declaration.unbind(String.format("Instance configuration is
invalid (component:%s/%s, bundle:%d)",
+                            instanceDeclaration.unbind(String.format("Instance configuration
is invalid (component:%s/%s, bundle:%d)",
                                     m_declaration.getComponentName(),
                                     m_declaration.getComponentVersion(),
                                     reference.getBundle().getBundleId()),
                                     c);
                         } catch (MissingHandlerException e) {
-                            m_declaration.unbind(String.format("Component '%s/%s' is missing
some handlers", m_declaration.getComponentName(), m_declaration.getComponentVersion()), e);
+                            instanceDeclaration.unbind(
+                                    String.format(
+                                            "Component '%s/%s' (required for instance creation)
is missing some handlers",
+                                            m_declaration.getComponentName(),
+                                            m_declaration.getComponentVersion()
+                                    ),
+                                    e);
                         } catch (ConfigurationException e) {
-                            m_declaration.unbind(String.format("Component '%s/%s' is incorrect",
m_declaration.getComponentName(), m_declaration.getComponentVersion()), e);
+                            instanceDeclaration.unbind(
+                                    String.format(
+                                            "Instance configuration is incorrect for component
'%s/%s'",
+                                            m_declaration.getComponentName(),
+                                            m_declaration.getComponentVersion()),
+                                    e);
                         }
 
                         return null;



Mime
View raw message