On Dec 11, 2006, at 8:37 AM, Jeroen Frijters wrote:
David Daney wrote:
Jeroen Frijters wrote:
throw new RuntimeException("error instantiating default
socket factory: "
- + ex.toString());
That sounds more like an InternalError than the super-generic
RuntimeException.
Possibly. I don't know enough about this stuff to tell. I have,
however,
since discovered that the current code is wrong. When the factory
is not
properly configured it is supposed to return a factory that throws
exceptions upon invocation of the factory methods, not at this stage.
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.
...and yes, looking at the JavaDoc for 1.5 after writing that, they
do say that it returns an inoperative factory on error. This makes no
sense to me, but if that's what the RI does, then we should do it, too.
I've got a patch (attached), but I'm going on vacation tomorrow and
don't have time to properly test it and check it in, but if someone
would like to do so, that would be great.
I'll look at this, unless someone else wants to volunteer.
Thanks.