You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by dl...@apache.org on 2001/11/02 06:09:37 UTC

cvs commit: jakarta-velocity/src/java/org/apache/velocity/util/introspection ClassMap.java

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:bob@werken.com">Bob McWhirter</a>
    * @author <a href="mailto:szegedia@freemail.hu">Attila Szegedi</a>
    * @author <a href="mailto:geirm@optonline.net">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:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>