You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by mi...@apache.org on 2003/06/27 05:58:43 UTC

cvs commit: jakarta-tapestry/framework/src/org/apache/tapestry/enhance ComponentClassFactory.java

mindbridge    2003/06/26 20:58:43

  Modified:    framework/src/org/apache/tapestry/enhance
                        ComponentClassFactory.java
  Log:
  Reformatting of the type name if it refers to an array
  
  Revision  Changes    Path
  1.16      +11 -4     jakarta-tapestry/framework/src/org/apache/tapestry/enhance/ComponentClassFactory.java
  
  Index: ComponentClassFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/org/apache/tapestry/enhance/ComponentClassFactory.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- ComponentClassFactory.java	21 Jun 2003 19:47:24 -0000	1.15
  +++ ComponentClassFactory.java	27 Jun 2003 03:58:43 -0000	1.16
  @@ -218,8 +218,15 @@
           {
               try
               {
  -
  -                result = _resolver.findClass(type);
  +                String typeName = type;
  +                
  +                // if it is an array name reformat it in the way Java expects it
  +                if (type.endsWith("[]")) {
  +                    String className = type.substring(0, type.length() - 2);
  +                    typeName = "[L" + className + ";"; 
  +                }
  +            
  +                result = _resolver.findClass(typeName);
               }
               catch (Exception ex)
               {
  @@ -228,7 +235,7 @@
                       location,
                       ex);
               }
  -
  +            
               _classMapping.recordType(type, result);
           }