This is the mail archive of the java-prs@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug classpath/25389] File(new URI("file:./")) -> java.lang.NullPointerException



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]