dlr         01/11/01 21:09:37

  Modified:    src/java/org/apache/velocity/util/introspection
                        ClassMap.java
  Log:
  Perform more intelligent initial allocation of the StringBuffer used
  to create the method key in the makeMethodKey(Method) instance method.
  
  Revision  Changes    Path
  1.15      +4 -2      
jakarta-velocity/src/java/org/apache/velocity/util/introspection/ClassMap.java
  
  Index: ClassMap.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-velocity/src/java/org/apache/velocity/util/introspection/ClassMap.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -u -r1.14 -r1.15
  --- ClassMap.java     2001/10/22 03:53:27     1.14
  +++ ClassMap.java     2001/11/02 05:09:37     1.15
  @@ -70,7 +70,7 @@
    * @author <a href="mailto:[EMAIL PROTECTED]";>Bob McWhirter</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>Attila Szegedi</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>Geir Magnusson Jr.</a>
  - * @version $Id: ClassMap.java,v 1.14 2001/10/22 03:53:27 jon Exp $
  + * @version $Id: ClassMap.java,v 1.15 2001/11/02 05:09:37 dlr Exp $
    */
   public class ClassMap
   {
  @@ -209,7 +209,7 @@
       {
           Class[] parameterTypes = method.getParameterTypes();
           
  -        StringBuffer methodKey = new StringBuffer().append(method.getName());
  +        StringBuffer methodKey = new StringBuffer(method.getName());
           
           for (int j = 0; j < parameterTypes.length; j++)
           {
  @@ -239,7 +239,9 @@
                       methodKey.append("java.lang.Short");
               }                
               else
  +            {
                   methodKey.append(parameterTypes[j].getName());
  +            }
           }            
           
           return methodKey.toString();
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to