URLConnection.getRequestProperties() doesn't throw as promised

Alan Bateman Alan.Bateman at oracle.com
Wed May 19 00:55:44 PDT 2010


Martin Buchholz wrote:
> Hi net-dev gang,
>
> A colleague reports that:
>
> URLConnection.getRequestProperties() promises to throw an
> IllegalStateException when invoked on a connected instance. But Java 6
> returns a valid map.
>
> Can you get either the spec or the implementation fixed so that the two agree?
>
> Thanks,
>
> Martin
>   
This isn't my area, but I just did a quick test with a http URL and 
IllegalStateException is thrown (with both 6 and 7). Any chance that 
connect hasn't been invoked? Or perhaps you (or Jesse) see this with a 
specific protocol handler?

-Alan.



More information about the net-dev mailing list