Skip to content

Commit a09f06d

Browse files
committedJan 24, 2025
8348265: RMIConnectionImpl: Remove Subject.callAs on MarshalledObject
Reviewed-by: rriggs
1 parent 0395593 commit a09f06d

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed
 

‎src/java.management.rmi/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java

+2-15
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ private synchronized ServerNotifForwarder getServerNotifFwd() {
122122
}
123123

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

@@ -1495,20 +1495,7 @@ private <T> T unwrap(final MarshalledObject<?> mo,
14951495
try {
14961496
ClassLoader old = setCcl(cl);
14971497
try {
1498-
if (subject != null) {
1499-
try {
1500-
return Subject.callAs(subject, () -> wrappedClass.cast(mo.get()));
1501-
} catch (CompletionException ce) {
1502-
Throwable thr = ce.getCause();
1503-
if (thr instanceof Exception e) {
1504-
throw e;
1505-
} else {
1506-
throw new RuntimeException(thr);
1507-
}
1508-
}
1509-
} else {
1510-
return wrappedClass.cast(mo.get());
1511-
}
1498+
return wrappedClass.cast(mo.get());
15121499
} finally {
15131500
setCcl(old);
15141501
}

0 commit comments

Comments
 (0)