hello Mark, On Monday 02 January 2006 00:50, Mark Wielaard wrote: > Hi Raif, > > On Tue, 2005-12-27 at 10:19 +1100, Raif S. Naffah wrote: > > pls. find attached a patch to do the above. sometimes, the > > parameter localhost (to the InetAddress.getAllByName(String) > > method) is an empty string which causes an UnknownHostException to > > be thrown. the patch ensures that if this is the case LOCALHOST is > > used instead. > > This looks sane. I committed it as follows (removed the commented out > code, moved the trim() up...
but now the test for null is done twice ;-) if we're sticklers for performance, we probably should do: if (xxx == null) doDefaultOrThrowException(); else { xxx = xxx.trim(); if (xxx.length() == 0) doDefaultOrThrowException(); } > so we don't do it twice and added a comment > about trim in the ChangeLog entry). > > 2006-01-01 Raif S. Naffah <[EMAIL PROTECTED]> > > * java/net/InetAddress.java (getAllByName): use LOCALHOST if > localhost is null or is an empty string. Trim hostname before > lookup. thanks. > Could you add a Mauve test for this? done. cheers; rsn
pgpSh2T3GHpk8.pgp
Description: PGP signature
_______________________________________________ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches