Stzx commented on a change in pull request #475: LANG-1495 Update EnumUtils.java
URL: https://github.com/apache/commons-lang/pull/475#discussion_r339421728
 
 

 ##########
 File path: src/main/java/org/apache/commons/lang3/EnumUtils.java
 ##########
 @@ -119,13 +119,29 @@ public EnumUtils() {
      * @return the enum, null if not found
      */
     public static <E extends Enum<E>> E getEnum(final Class<E> enumClass, 
final String enumName) {
+        return getEnum(enumClass, enumName, null);
+    }
+
+    /**
+     * <p>Gets the enum for the class, returning {@code defaultEnum} if not 
found.</p>
+     *
+     * <p>This method differs from {@link Enum#valueOf} in that it does not 
throw an exception
+     * for an invalid enum name.</p>
+     *
+     * @param <E> the type of the enumeration
+     * @param enumClass   the class of the enum to query, not null
+     * @param enumName    the enum name, null returns default enum
+     * @param defaultEnum the default enum
+     * @return the enum, default enum if not found
 
 Review comment:
   `3.10` :)

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to