------- Comment #1 from mark at gcc dot gnu dot org 2005-12-13 11:46 -------
Confirmed. URI.getPath() may return null and we don't check for that in the
File(URI) constructor. A simple fix might be:
diff -u -r1.59 File.java
--- java/io/File.java 6 Nov 2005 20:28:00 -0000 1.59
+++ java/io/File.java 13 Dec 2005 11:37:26 -0000
@@ -406,7 +406,11 @@
if (!uri.getScheme().equals("file"))
throw new IllegalArgumentException("invalid uri protocol");
- path = normalizePath(uri.getPath());
+ String name = uri.getPath();
+ if (name == null)
+ name = "";
+
+ path = normalizePath(name);
}
/**
Note that java/io/File.java is not fully merged between classpath and libgcj.
--
mark at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2005-12-13 11:46:25
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25389