Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2128660 | 5.0u7 | Tal Moscovitz | P4 | Resolved | Fixed | b01 |
JDK-2126509 | 1.4.2_11 | Tal Moscovitz | P4 | Resolved | Fixed | b01 |
We note that BugID: 4674826 is fixed in 142 release.
However, java.net.Socket checks for old-style impls like this:
private void checkOldImpl() {
if (impl == null)
return;
// SocketImpl.connect() is a protected method, therefore we need to use
// getDeclaredMethod, therefore we need permission to access the member
try {
AccessController.doPrivileged(new PrivilegedExceptionAction() {
public Object run() throws NoSuchMethodException {
Class[] cl = new Class[2];
cl[0] = SocketAddress.class;
cl[1] = Integer.TYPE;
impl.getClass().getDeclaredMethod("connect", cl);
return null;
}
});
} catch (java.security.PrivilegedActionException e) {
oldImpl = true;
}
}
However, my understanding is that this will exclude inherited methods on the impl. In our instance we have a BSocketImpl that inherits from ASocketImpl where only ASocketImpl has the appropriate connect() method. java.net.Socket therefor wrongly assumes that it is an old-style impl.
However, java.net.Socket checks for old-style impls like this:
private void checkOldImpl() {
if (impl == null)
return;
// SocketImpl.connect() is a protected method, therefore we need to use
// getDeclaredMethod, therefore we need permission to access the member
try {
AccessController.doPrivileged(new PrivilegedExceptionAction() {
public Object run() throws NoSuchMethodException {
Class[] cl = new Class[2];
cl[0] = SocketAddress.class;
cl[1] = Integer.TYPE;
impl.getClass().getDeclaredMethod("connect", cl);
return null;
}
});
} catch (java.security.PrivilegedActionException e) {
oldImpl = true;
}
}
However, my understanding is that this will exclude inherited methods on the impl. In our instance we have a BSocketImpl that inherits from ASocketImpl where only ASocketImpl has the appropriate connect() method. java.net.Socket therefor wrongly assumes that it is an old-style impl.
- backported by
-
JDK-2126509 java.net.Socket checks for old-style impls
-
- Resolved
-
-
JDK-2128660 java.net.Socket checks for old-style impls
-
- Resolved
-
- relates to
-
JDK-4674826 REGRESSION: java.net.Socket constructor throws security exception
-
- Resolved
-
-
JDK-6449565 Pre-1.4 SocketImpl no longer supported
-
- Resolved
-