mirror of
https://github.com/openjdk/jdk7u.git
synced 2025-12-12 00:09:03 -06:00
8282300: Throws NamingException instead of InvalidNameException after JDK-8278972
Reviewed-by: bae Backport-of: e6afb6ff81c9004aadaa6f694e643de9703dd32d
This commit is contained in:
parent
a4c19d9e66
commit
f8e1bf0093
@ -153,6 +153,12 @@ public class rmiURLContext extends GenericURLContext {
|
|||||||
throw newNamingException(iae);
|
throw newNamingException(iae);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
int fmark = url.indexOf('#', i);
|
||||||
|
if (fmark > -1) {
|
||||||
|
if (!acceptsFragment()) {
|
||||||
|
throw newNamingException(new IllegalArgumentException("URI fragments not supported: " + url));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ("".equals(host)) {
|
if ("".equals(host)) {
|
||||||
host = null;
|
host = null;
|
||||||
@ -286,12 +292,12 @@ public class rmiURLContext extends GenericURLContext {
|
|||||||
}
|
}
|
||||||
|
|
||||||
NamingException newNamingException(Throwable cause) {
|
NamingException newNamingException(Throwable cause) {
|
||||||
NamingException ne = new NamingException(cause.getMessage());
|
NamingException ne = new InvalidNameException(cause.getMessage());
|
||||||
ne.initCause(cause);
|
ne.initCause(cause);
|
||||||
return ne;
|
return ne;
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean acceptsFragment() {
|
protected boolean acceptsFragment() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user