This is the mail archive of the
java-prs@gcc.gnu.org
mailing list for the Java project.
[Bug classpath/25389] File(new URI("file:./")) -> java.lang.NullPointerException
- From: "mark at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: java-prs at gcc dot gnu dot org
- Date: 13 Dec 2005 22:01:38 -0000
- Subject: [Bug classpath/25389] File(new URI("file:./")) -> java.lang.NullPointerException
- References: <bug-25389-8961@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from mark at gcc dot gnu dot org 2005-12-13 22:01 -------
(In reply to comment #3)
> Exception in thread "main" java.lang.IllegalArgumentException: URI is not
> hierarchical
> at java.io.File.<init>(File.java:344)
> at myfirstprog.main(myfirstprog.java:16)
Interesting. That is a bit lame. But seems legal since the uri scheme isn't
followed by a double slash so it is indeed not hierarchical.
But since we are constructing such URLs/URIs ourselves (for example in the
SystemClassLoader) through new URL("file", "", -1, "./") it seems wise to
handle them explicitly in the File(URI) constructor.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25389