rationale for swallowing exceptions in Class#getEnumConstantsShared

Jochen Theodorou blackdrag at gmx.org
Fri Feb 28 16:48:52 UTC 2014

Am 28.02.2014 17:36, schrieb Peter Levart:
>  The other use of
> getEnumConstantsShared() is to support the Enum.valueOf(Class, String)
> method which already throws IllegalArgumentException if the 1st
> parameter does not represent an enum class, so there's no compatibility
> concerns about that use.

Enum.valueOf is the method through which I discovered this. I have 
exactly this case, an enum, which seems not to fit 
getEnumConstantsShared for an unknown reason. My additional problem 
though is, that sometimes the call works and sometimes not.

bye Jochen

Jochen "blackdrag" Theodorou - Groovy Project Tech Lead
blog: http://blackdragsview.blogspot.com/
german groovy discussion newsgroup: de.comp.lang.misc
For Groovy programming sources visit http://groovy-lang.org

More information about the core-libs-dev mailing list