Skip to content

Commit

Permalink
8348265: RMIConnectionImpl: Remove Subject.callAs on MarshalledObject
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinjwalls committed Jan 22, 2025
1 parent 9b98cc0 commit 193adf0
Showing 1 changed file with 2 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ private synchronized ServerNotifForwarder getServerNotifFwd() {
}

public String getConnectionId() throws IOException {
// We should call reqIncomming() here... shouldn't we?
// reqIncoming()/rspOutgoing() could be here, but never have been.
return connectionId;
}

Expand Down Expand Up @@ -1495,20 +1495,7 @@ private <T> T unwrap(final MarshalledObject<?> mo,
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);
}
Expand Down

0 comments on commit 193adf0

Please sign in to comment.