summaryrefslogtreecommitdiffstats
path: root/libjava
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2005-12-14 18:36:55 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2005-12-14 18:36:55 +0000
commit3768cfc2782a9ffe435950e6fc12fa9b35d4e5d4 (patch)
treeac9f7c38fbc0ddb4d6d0ff7c2ceaf0e2ed64431d /libjava
parent6d5cf6929b516b95fe065d9d34aa6e82d21bcd03 (diff)
downloadppe42-gcc-3768cfc2782a9ffe435950e6fc12fa9b35d4e5d4.tar.gz
ppe42-gcc-3768cfc2782a9ffe435950e6fc12fa9b35d4e5d4.zip
PR classpath/25389:
* java/io/File.java (File): Throw IllegalArgumentException if URI is non-hierarchical. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@108528 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava')
-rw-r--r--libjava/ChangeLog6
-rw-r--r--libjava/java/io/File.java6
2 files changed, 11 insertions, 1 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index 0f7225bf335..bee1eb0d907 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,3 +1,9 @@
+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
diff --git a/libjava/java/io/File.java b/libjava/java/io/File.java
index 06c321556f2..e3d59cb7d24 100644
--- a/libjava/java/io/File.java
+++ b/libjava/java/io/File.java
@@ -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);
}
/**
OpenPOWER on IntegriCloud