Commit 3ce43126 by Tom Tromey Committed by Tom Tromey

re PR classpath/25389 (File(new URI("file:./")) -> java.lang.NullPointerException)

	PR classpath/25389:
	* java/io/File.java (File): Throw IllegalArgumentException if URI is
	non-hierarchical.

From-SVN: r108528
parent 3165dcfa
2005-12-14 Tom Tromey <tromey@redhat.com>
PR classpath/25389:
* java/io/File.java (File): Throw IllegalArgumentException if URI is
non-hierarchical.
2005-12-12 Andrew Haley <aph@redhat.com>
* java/lang/VMCompiler.java: Directly generate a new instance of
......
......@@ -434,7 +434,11 @@ public class File implements Serializable, Comparable
if (!uri.getScheme().equals("file"))
throw new IllegalArgumentException("invalid uri protocol");
path = normalizePath(uri.getPath());
String name = uri.getPath();
if (name == null)
throw new IllegalArgumentException("URI \"" + uri
+ "\" is not hierarchical");
path = normalizePath(name);
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment