Author: bayard
Date: Thu Apr  9 08:38:53 2009
New Revision: 763561

URL: http://svn.apache.org/viewvc?rev=763561&view=rev
Log:
Improving getPackageName(Class) to be class.getPackage().getName(). This method 
then becomes one of the null-protection only methods... which are imo 
struggling for justification

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=763561&r1=763560&r2=763561&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 
Thu Apr  9 08:38:53 2009
@@ -224,7 +224,7 @@
         if (cls == null) {
             return StringUtils.EMPTY;
         }
-        return getPackageName(cls.getName());
+        return cls.getPackage().getName();
     }
 
     /**


Reply via email to