Casey Marshall wrote:
> Really? That seems like worse behavior than just giving up when  
> trying to create the factory. Just delaying exceptions like that  
> seems like it will just hide bugs, instead of forcing you to deal  
> with them up front.

Well, given that this method is currently used from a static initializer
in a couple of places it actually improves debuggability *a lot*.
Failing a static initializer is generally a pain in the ass to debug
(because it has a high likelihood of being hidden by user code that
swallows exceptions (or even our own code) and also results in bogus
NoClassDefFoundError exceptions if the class is later accessed again).

Regards,
Jeroen

Reply via email to