DaveAKing / guava-libraries

Automatically exported from code.google.com/p/guava-libraries
Apache License 2.0
0 stars 0 forks source link

NullPointerException in Maps.newEnumMap #1724

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It seems this factory method causes a NullPointerException in some or all cases.

Original issue reported on code.google.com by cyrille....@gmail.com on 11 Apr 2014 at 4:00

Attachments:

GoogleCodeExporter commented 9 years ago
This is only possible if you ignore the unchecked type warnings; if you pass a 
Class<E> where E extends Enum<E>, this should never have a problem.  (In any 
event, the exception is thrown by java.util.EnumMap, not Guava code.)

Original comment by wasserman.louis on 11 Apr 2014 at 4:05

GoogleCodeExporter commented 9 years ago
I see. This bug can be closed then (the lack of strict type-checking at compile 
time is because of the way Java handles generics internally).

Original comment by cyrille....@gmail.com on 11 Apr 2014 at 4:29

GoogleCodeExporter commented 9 years ago

Original comment by kevinb@google.com on 14 Apr 2014 at 10:31

GoogleCodeExporter commented 9 years ago
This issue has been migrated to GitHub.

It can be found at https://github.com/google/guava/issues/<id>

Original comment by cgdecker@google.com on 1 Nov 2014 at 4:09

GoogleCodeExporter commented 9 years ago

Original comment by cgdecker@google.com on 3 Nov 2014 at 9:07