geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r432413 - /geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanInstance.java
Date Thu, 17 Aug 2006 22:28:09 GMT
Author: djencks
Date: Thu Aug 17 15:28:09 2006
New Revision: 432413

URL: http://svn.apache.org/viewvc?rev=432413&view=rev
Log:
GERONIMO-2330 improve error message on mismatched constructor

Modified:
    geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanInstance.java

Modified: geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanInstance.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanInstance.java?rev=432413&r1=432412&r2=432413&view=diff
==============================================================================
--- geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanInstance.java
(original)
+++ geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanInstance.java
Thu Aug 17 15:28:09 2006
@@ -30,6 +30,8 @@
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import java.util.Arrays;
+
 import javax.management.ObjectName;
 
 import org.apache.commons.logging.Log;
@@ -325,10 +327,11 @@
             constructor = type.getConstructor(parameterTypes);
         } catch (NoSuchMethodException e) {
             StringBuffer buf = new StringBuffer("Could not find a valid constructor for GBean:
").append(gbeanInfo.getName()).append("\n");
+            buf.append("ParameterTypes: ").append(Arrays.asList(parameterTypes)).append("\n");
             Constructor[] constructors = type.getConstructors();
             for (int i = 0; i < constructors.length; i++) {
                 Constructor testConstructor = constructors[i];
-                buf.append("constructor types: ").append(testConstructor.getParameterTypes()).append("\n");
+                buf.append("constructor types: ").append(Arrays.asList(testConstructor.getParameterTypes())).append("\n");
                 if (testConstructor.getParameterTypes().length == parameterTypes.length)
{
                     Class[] testParameterTypes = testConstructor.getParameterTypes();
                     for (int k = 0; k < testParameterTypes.length; k++) {



Mime
View raw message