tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util IntrospectionUtils.java
Date Sun, 26 Jun 2005 21:19:28 GMT
pero        2005/06/26 14:19:28

  Modified:    util/java/org/apache/tomcat/util IntrospectionUtils.java
  Log:
  add boolean is<porperty> support to getProperty
  
  Revision  Changes    Path
  1.15      +4 -0      jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/IntrospectionUtils.java
  
  Index: IntrospectionUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/IntrospectionUtils.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- IntrospectionUtils.java	16 Dec 2004 03:51:41 -0000	1.14
  +++ IntrospectionUtils.java	26 Jun 2005 21:19:28 -0000	1.15
  @@ -370,6 +370,7 @@
   
       public static Object getProperty(Object o, String name) {
           String getter = "get" + capitalize(name);
  +        String isGetter = "is" + capitalize(name);
   
           try {
               Method methods[] = findMethods(o.getClass());
  @@ -381,6 +382,9 @@
                   if (getter.equals(methods[i].getName()) && paramT.length == 0)
{
                       return methods[i].invoke(o, (Object[]) null);
                   }
  +                if (isGetter.equals(methods[i].getName()) && paramT.length == 0)
{
  +                    return methods[i].invoke(o, (Object[]) null);
  +                }
   
                   if ("getProperty".equals(methods[i].getName())) {
                       getPropertyMethod = methods[i];
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message