You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by GitBox <gi...@apache.org> on 2019/10/28 05:57:10 UTC

[GitHub] [commons-lang] vlcheong commented on a change in pull request #475: LANG-1495 Update EnumUtils.java

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

 ##########
 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:
   @Stzx, may I know what version number should I put ?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services