mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-03 20:50:19 +00:00
8348265: RMIConnectionImpl: Remove Subject.callAs on MarshalledObject
Reviewed-by: rriggs
This commit is contained in:
parent
0395593a8a
commit
a09f06d538
@ -122,7 +122,7 @@ public class RMIConnectionImpl implements RMIConnection, Unreferenced {
|
||||
}
|
||||
|
||||
public String getConnectionId() throws IOException {
|
||||
// We should call reqIncomming() here... shouldn't we?
|
||||
// reqIncoming()/rspOutgoing() could be here, but never have been.
|
||||
return connectionId;
|
||||
}
|
||||
|
||||
@ -1495,20 +1495,7 @@ public class RMIConnectionImpl implements RMIConnection, Unreferenced {
|
||||
try {
|
||||
ClassLoader old = setCcl(cl);
|
||||
try {
|
||||
if (subject != null) {
|
||||
try {
|
||||
return Subject.callAs(subject, () -> wrappedClass.cast(mo.get()));
|
||||
} catch (CompletionException ce) {
|
||||
Throwable thr = ce.getCause();
|
||||
if (thr instanceof Exception e) {
|
||||
throw e;
|
||||
} else {
|
||||
throw new RuntimeException(thr);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return wrappedClass.cast(mo.get());
|
||||
}
|
||||
return wrappedClass.cast(mo.get());
|
||||
} finally {
|
||||
setCcl(old);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user