commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bay...@apache.org
Subject svn commit: r824597 - /commons/proper/lang/trunk/src/java/org/apache/commons/lang/ClassUtils.java
Date Tue, 13 Oct 2009 05:50:51 GMT
Author: bayard
Date: Tue Oct 13 05:50:51 2009
New Revision: 824597

URL: http://svn.apache.org/viewvc?rev=824597&view=rev
Log:
Prefering the Class methods (and thus JDK) over the String methods for getShortClassName/getPackageName
when you already have an Object

Modified:
    commons/proper/lang/trunk/src/java/org/apache/commons/lang/ClassUtils.java

Modified: commons/proper/lang/trunk/src/java/org/apache/commons/lang/ClassUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/java/org/apache/commons/lang/ClassUtils.java?rev=824597&r1=824596&r2=824597&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/java/org/apache/commons/lang/ClassUtils.java (original)
+++ commons/proper/lang/trunk/src/java/org/apache/commons/lang/ClassUtils.java Tue Oct 13
05:50:51 2009
@@ -156,7 +156,7 @@
         if (object == null) {
             return valueIfNull;
         }
-        return getShortClassName(object.getClass().getName());
+        return getShortClassName(object.getClass());
     }
 
     /**
@@ -211,7 +211,7 @@
         if (object == null) {
             return valueIfNull;
         }
-        return getPackageName(object.getClass().getName());
+        return getPackageName(object.getClass());
     }
 
     /**



Mime
View raw message