Author: hlship
Date: Wed Apr  6 19:12:21 2011
New Revision: 1089587

URL: http://svn.apache.org/viewvc?rev=1089587&view=rev
Log:
TAP5-853: Have MethodDescription use the correctly functioning 
Class-to-type-name methods from PlasticInternalUtils, rather than its own 
incomplete implementation

(note: 1 failed test remains)

Modified:
    
tapestry/tapestry5/trunk/plastic/src/main/java/org/apache/tapestry5/plastic/MethodDescription.java

Modified: 
tapestry/tapestry5/trunk/plastic/src/main/java/org/apache/tapestry5/plastic/MethodDescription.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/plastic/src/main/java/org/apache/tapestry5/plastic/MethodDescription.java?rev=1089587&r1=1089586&r2=1089587&view=diff
==============================================================================
--- 
tapestry/tapestry5/trunk/plastic/src/main/java/org/apache/tapestry5/plastic/MethodDescription.java
 (original)
+++ 
tapestry/tapestry5/trunk/plastic/src/main/java/org/apache/tapestry5/plastic/MethodDescription.java
 Wed Apr  6 19:12:21 2011
@@ -105,25 +105,9 @@ public class MethodDescription implement
     /** Creates a MethodDescription from a Java Method. */
     public MethodDescription(Method method)
     {
-        this(method.getModifiers(), toTypeName(method.getReturnType()), 
method.getName(), toTypeNames(method
-                .getParameterTypes()), 
toTypeNames(method.getExceptionTypes()));
-    }
-
-    @SuppressWarnings("rawtypes")
-    private static String toTypeName(Class type)
-    {
-        return type.getName();
-    }
-
-    @SuppressWarnings("rawtypes")
-    private static String[] toTypeNames(Class[] types)
-    {
-        String[] result = new String[types.length];
-
-        for (int i = 0; i < types.length; i++)
-            result[i] = toTypeName(types[i]);
-
-        return result;
+        this(method.getModifiers(), 
PlasticInternalUtils.toTypeName(method.getReturnType()), method.getName(),
+                PlasticInternalUtils.toTypeNames(method.getParameterTypes()), 
PlasticInternalUtils.toTypeNames(method
+                        .getExceptionTypes()));
     }
 
     public int compareTo(MethodDescription o)


Reply via email to