[
https://issues.apache.org/jira/browse/LANG-513?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ivan Bilenjkij updated LANG-513:
--------------------------------
Attachment: EnumUtilsTest.patch
EnumUtils.patch
Added patches for EnumUtils.
> Better EnumUtils
> ----------------
>
> Key: LANG-513
> URL: https://issues.apache.org/jira/browse/LANG-513
> Project: Commons Lang
> Issue Type: Improvement
> Affects Versions: 3.0
> Reporter: Ivan Bilenjkij
> Fix For: 3.0
>
> Attachments: EnumUtils.patch, EnumUtilsTest.patch
>
>
> Parametrize the getEnumMap() method with <E extends Enum<E>>. This narrows
> down the argument so that non-enums and {{null}} are rejected at compile
> time. Also, at it current state the EnumUtils should never be instantiated.
> {code:title=EnumUtils.java} public static Map<String, Enum<?>>
> getEnumMap(Class enumClass) {code}
> changes to:
> {code:title=EnumUtils.java} public static <E extends Enum<E>> Map<String,
> Enum<E>> getEnumMap(Class<E> enumClass) {code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.