You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ba...@apache.org on 2011/04/29 07:59:53 UTC

svn commit: r1097697 - /commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/ClassUtils.java

Author: bayard
Date: Fri Apr 29 05:59:53 2011
New Revision: 1097697

URL: http://svn.apache.org/viewvc?rev=1097697&view=rev
Log:
Noting the difference between getSimpleName and getShortName in the getShortName javadoc

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

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/ClassUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/ClassUtils.java?rev=1097697&r1=1097696&r2=1097697&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/ClassUtils.java (original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/ClassUtils.java Fri Apr 29 05:59:53 2011
@@ -157,7 +157,9 @@ public class ClassUtils {
     /**
      * <p>Gets the class name minus the package name from a {@code Class}.</p>
      * 
-     * <p>Consider using the Java 5 API {@link Class#getSimpleName()} instead.</p>
+     * <p>Consider using the Java 5 API {@link Class#getSimpleName()} instead. 
+     * The one known difference is that this code will return {@code "Map.Entry"} while 
+     * the {@code java.lang.Class} variant will simply return {@code "Entry"}. </p>
      *
      * @param cls  the class to get the short name for.
      * @return the class name without the package name or an empty string
@@ -173,6 +175,10 @@ public class ClassUtils {
      * <p>Gets the class name minus the package name from a String.</p>
      *
      * <p>The string passed in is assumed to be a class name - it is not checked.</p>
+
+     * <p>Note that this method differs from Class.getSimpleName() in that this will 
+     * return {@code "Map.Entry"} whilst the {@code java.lang.Class} variant will simply 
+     * return {@code "Entry"}. </p>
      *
      * @param className  the className to get the short name for
      * @return the class name of the class without the package name or an empty string