From mboxrd@z Thu Jan 1 00:00:00 1970 From: mattnewsome@fuckmicrosoft.com To: gcc-gnats@gcc.gnu.org Cc: mattnewsome@fuckmicrosoft.com Subject: libgcj/4383: file: protocol not supported in URLConnection? Date: Mon, 24 Sep 2001 08:56:00 -0000 Message-id: <20010924154826.4033.qmail@sourceware.cygnus.com> X-SW-Source: 2001-09/msg00470.html List-Id: >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: