Issue 260: NullPointerException in Guice.createInjector(...) with null  
module
http://code.google.com/p/google-guice/issues/detail?id=260

Comment #4 by limpbizkit:
FYI, all of the methods in Guice throw NullPointerException given null  
arguments unless null is explicitly
permitted.

There have been many IllegalStateException vs. NullPointerException  
flamewars. We've decided NPE is the best
choice, if only because it's a lot easier to enforce - just dereference the  
parameter.

In any case, the distinction is insignificant. Both exceptions indicate a  
programming error, and it is a  a mistake
to catch either exception explicitly. (Catching RuntimeException is okay  
for fault-tolerance)



-- 
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"google-guice-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-guice-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to