We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a5cb23e commit ff3e558Copy full SHA for ff3e558
src/java.base/unix/classes/sun/nio/fs/UnixUriUtils.java
@@ -1,5 +1,5 @@
1
/*
2
- * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2020, Oracle and/or its affiliates. All rights reserved.
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
*
5
* This code is free software; you can redistribute it and/or modify it
@@ -83,7 +83,8 @@ static Path fromUri(UnixFileSystem fs, URI uri) {
83
if (b == 0)
84
throw new IllegalArgumentException("Nul character not allowed");
85
} else {
86
- assert c < 0x80;
+ if (c == 0 || c >= 0x80)
87
+ throw new IllegalArgumentException("Bad escape");
88
b = (byte)c;
89
}
90
result[rlen++] = b;
0 commit comments