commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rdon...@apache.org
Subject cvs commit: jakarta-commons/beanutils/src/java/org/apache/commons/beanutils MethodUtils.java
Date Thu, 01 Aug 2002 18:30:11 GMT
rdonkin     2002/08/01 11:30:11

  Modified:    beanutils/src/java/org/apache/commons/beanutils
                        MethodUtils.java
  Log:
  Improved primitive type checking
  
  Revision  Changes    Path
  1.11      +5 -5      jakarta-commons/beanutils/src/java/org/apache/commons/beanutils/MethodUtils.java
  
  Index: MethodUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/beanutils/src/java/org/apache/commons/beanutils/MethodUtils.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- MethodUtils.java	29 Jul 2002 18:23:45 -0000	1.10
  +++ MethodUtils.java	1 Aug 2002 18:30:11 -0000	1.11
  @@ -597,19 +597,19 @@
               // does anyone know a better strategy than comparing names?
               // also, this method does *not* do widening - you must specify exactly
               // is this the right behaviour?
  -            if (parameterType.getName().equals("boolean")) {
  +            if (boolean.class.equals(parameterType)) {
                   return Boolean.class.equals(parameterization);
               }         
  -            if (parameterType.getName().equals("float")) {
  +            if (float.class.equals(parameterType)) {
                   return Float.class.equals(parameterization);
               }     
  -            if (parameterType.getName().equals("long")) {
  +            if (long.class.equals(parameterType)) {
                   return Long.class.equals(parameterization);
               }     
  -            if (parameterType.getName().equals("int")) {
  +            if (int.class.equals(parameterType)) {
                   return Integer.class.equals(parameterization);
               }                
  -            if (parameterType.getName().equals("double")) {
  +            if (double.class.equals(parameterType)) {
                   return Double.class.equals(parameterization);
               }               
           }
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message