Enum.valueOf(String)

Alan Bateman Alan.Bateman at oracle.com
Mon Aug 19 08:32:56 UTC 2013


On 18/08/2013 05:07, Paul Benedict wrote:
> I think the generated method needs to be listed in the class javadoc at
> least. I presume it throws an exception too (like the other valueOf) if the
> String can't be resolved to a constant, but no user is going to discover
> this fact through the documentation.
>
Have you checked the generated avadoc for your enum? The valueOf(String) 
should be there and specified to throw IAE or NPE.

-Alan





More information about the core-libs-dev mailing list