geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r784004 - /geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/BeanRecipe.java
Date Fri, 12 Jun 2009 06:44:46 GMT
Author: gnodet
Date: Fri Jun 12 06:44:46 2009
New Revision: 784004

URL: http://svn.apache.org/viewvc?rev=784004&view=rev
Log:
Better exception message for ambiguities

Modified:
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/BeanRecipe.java

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/BeanRecipe.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/BeanRecipe.java?rev=784004&r1=784003&r2=784004&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/BeanRecipe.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/BeanRecipe.java
Fri Jun 12 06:44:46 2009
@@ -207,7 +207,7 @@
             } else if (matches.size() == 0) {
                 throw new ComponentDefinitionException("Unable to find a matching factory
method " + factoryMethod + " on class " + factoryObj.getClass() + " for arguments " + args
+ " when instanciating bean " + getName());
             } else {
-                throw new ComponentDefinitionException("Multiple matching factory methods
" + factoryMethod + " found on class " + factoryObj.getClass() + " for arguments " + args
+ " when instanciating bean " + getName());
+                throw new ComponentDefinitionException("Multiple matching factory methods
" + factoryMethod + " found on class " + factoryObj.getClass() + " for arguments " + args
+ " when instanciating bean " + getName() + ": " + matches.keySet());
             }
         } else if (factoryMethod != null) {
             // Map of matching methods
@@ -222,7 +222,7 @@
             } else if (matches.size() == 0) {
                 throw new ComponentDefinitionException("Unable to find a matching factory
method " + factoryMethod + " on class " + getType() + " for arguments " + args + " when instanciating
bean " + getName());
             } else {
-                throw new ComponentDefinitionException("Multiple matching factory methods
" + factoryMethod + " found on class " + getType() + " for arguments " + args + " when instanciating
bean " + getName());
+                throw new ComponentDefinitionException("Multiple matching factory methods
" + factoryMethod + " found on class " + getType() + " for arguments " + args + " when instanciating
bean " + getName() + ": " + matches.keySet());
             }
         } else {
             if (getType() == null) {
@@ -240,7 +240,7 @@
             } else if (matches.size() == 0) {
                 throw new ComponentDefinitionException("Unable to find a matching constructor
on class " + getType() + " for arguments " + args + " when instanciating bean " + getName());
             } else {
-                throw new ComponentDefinitionException("Multiple matching constructors found
on class " + getType() + " for arguments " + args + " when instanciating bean " + getName());
+                throw new ComponentDefinitionException("Multiple matching constructors found
on class " + getType() + " for arguments " + args + " when instanciating bean " + getName()
+ ": " + matches.keySet());
             }
         }
         



Mime
View raw message