garydgregory commented on a change in pull request #758:
URL: https://github.com/apache/commons-lang/pull/758#discussion_r820261275



##########
File path: src/main/java/org/apache/commons/lang3/EnumUtils.java
##########
@@ -67,7 +67,7 @@
     private static <E extends Enum<E>> Class<E> checkBitVectorable(final 
Class<E> enumClass) {
         final E[] constants = asEnum(enumClass).getEnumConstants();
         Validate.isTrue(constants.length <= Long.SIZE, 
CANNOT_STORE_S_S_VALUES_IN_S_BITS,
-            Integer.valueOf(constants.length), enumClass.getSimpleName(), 
Integer.valueOf(Long.SIZE));
+            Integer.valueOf(constants.length), 
ClassUtils.getSimpleName(enumClass), Integer.valueOf(Long.SIZE));

Review comment:
       This does not make sense since a null enumClass will cause an exception 
before we even get here.

##########
File path: src/main/java/org/apache/commons/lang3/time/FastDateParser.java
##########
@@ -564,7 +565,7 @@ boolean parse(final FastDateParser parser, final Calendar 
calendar, final String
          */
         @Override
         public String toString() {
-            return getClass().getSimpleName() + " [pattern=" + pattern + "]";
+            return ClassUtils.getSimpleName(this) + " [pattern=" + pattern + 
"]";

Review comment:
       We should not do this since a "this" will never be null.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to