geronimo-xbean-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r639072 - /geronimo/xbean/trunk/xbean-reflect/src/main/java/org/apache/xbean/recipe/ReflectionUtil.java
Date Wed, 19 Mar 2008 23:16:07 GMT
Author: dain
Date: Wed Mar 19 16:16:06 2008
New Revision: 639072

URL: http://svn.apache.org/viewvc?rev=639072&view=rev
Log:
Better error message

Modified:
    geronimo/xbean/trunk/xbean-reflect/src/main/java/org/apache/xbean/recipe/ReflectionUtil.java

Modified: geronimo/xbean/trunk/xbean-reflect/src/main/java/org/apache/xbean/recipe/ReflectionUtil.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-reflect/src/main/java/org/apache/xbean/recipe/ReflectionUtil.java?rev=639072&r1=639071&r2=639072&view=diff
==============================================================================
--- geronimo/xbean/trunk/xbean-reflect/src/main/java/org/apache/xbean/recipe/ReflectionUtil.java
(original)
+++ geronimo/xbean/trunk/xbean-reflect/src/main/java/org/apache/xbean/recipe/ReflectionUtil.java
Wed Mar 19 16:16:06 2008
@@ -273,7 +273,15 @@
         } else {
             StringBuffer buffer = new StringBuffer("Unable to find a valid setter method:
");
             buffer.append("public void ").append(typeClass.getName()).append(".");
-            buffer.append(setterName).append("(").append(propertyValue == null ? "null" :
propertyValue.getClass().getName()).append(")");
+            buffer.append(setterName).append("(");
+            if (propertyValue == null) {
+                buffer.append("null");
+            } else if (propertyValue instanceof String || propertyValue instanceof Recipe)
{
+                buffer.append("...");
+            } else {
+                buffer.append(propertyValue.getClass().getName());
+            }
+            buffer.append(")");
             throw new MissingAccessorException(buffer.toString(), -1);
         }
     }



Mime
View raw message