Is this a bug?

In 1.4.2_03, this executes perfectly ok :-

new Socket(“192.168.0.1\n”,port);

in 1.5beta1, the same code causes an Exception to be thrown.

java.lang.IllegalArgumentException: URI can't be null.
        at sun.net.spi.DefaultProxySelector.select(DefaultProxySelector.java:93)

        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:352)
        at java.net.Socket.connect(Socket.java:505)
        at java.net.Socket.connect(Socket.java:455)
        at java.net.Socket.<init>(Socket.java:363)
        at java.net.Socket.<init>(Socket.java:178)

Is this a bug in 1.5beta1,
or a bug in 1.4.2_03,
or simply a tightening up on the address parameter?

It could be a bug in both. Since I don’t see a null URI anywhere the exception appears to at least have the wrong message. But I doubt the newline is intended to be legal either.

reported :slight_smile:

im doin well so far :wink:

2 days of using 1.5, 2 bugs found :slight_smile:

Bug ID: 4995680

http://developer.java.sun.com/developer/bugParade/bugs/4995680.html