This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
libgcj/4383: file: protocol not supported in URLConnection?
- To: gcc-gnats at gcc dot gnu dot org
- Subject: libgcj/4383: file: protocol not supported in URLConnection?
- From: mattnewsome at fuckmicrosoft dot com
- Date: 24 Sep 2001 15:48:26 -0000
- Cc: mattnewsome at fuckmicrosoft dot com
- Reply-To: mattnewsome at fuckmicrosoft dot com
>Number: 4383
>Category: libgcj
>Synopsis: file: protocol not supported in URLConnection?
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Sep 24 08:56:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Matt Newsome
>Release: gcj (gcc 3.0.1)
>Organization:
>Environment:
linux x86
>Description:
Using a file: URL with URL.openConnection() to create a URLConnection() throws a NullPointerException. Similarly for any server name in an http: URL where that server name cannot be resolved to via DNS.
Took me a while to realise why my code was producing an unexplained NullPointerException.
Not supporting file: is ok (though would be very useful) however the NPE is confusing and should be changed to something more meaningful if possible.
>How-To-Repeat:
More details if required - email me.
>Fix:
Use FileInputStream instead of URLConnection for file: URLs.
>Release-Note:
>Audit-Trail:
>Unformatted: