mirror of
https://github.com/openjdk/jdk7u.git
synced 2025-12-10 10:13:47 -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);
|
||||
}
|
||||
}
|
||||
int fmark = url.indexOf('#', i);
|
||||
if (fmark > -1) {
|
||||
if (!acceptsFragment()) {
|
||||
throw newNamingException(new IllegalArgumentException("URI fragments not supported: " + url));
|
||||
}
|
||||
}
|
||||
|
||||
if ("".equals(host)) {
|
||||
host = null;
|
||||
@ -286,12 +292,12 @@ public class rmiURLContext extends GenericURLContext {
|
||||
}
|
||||
|
||||
NamingException newNamingException(Throwable cause) {
|
||||
NamingException ne = new NamingException(cause.getMessage());
|
||||
NamingException ne = new InvalidNameException(cause.getMessage());
|
||||
ne.initCause(cause);
|
||||
return ne;
|
||||
}
|
||||
|
||||
boolean acceptsFragment() {
|
||||
protected boolean acceptsFragment() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user