Skip to content

Commit

Permalink
WIP: 8342998: Remove all uses of AccessControlException
Browse files Browse the repository at this point in the history
Need to update once doPriv is removed
  • Loading branch information
kevinrushforth committed Oct 30, 2024
1 parent 082845b commit 2261aaf
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -948,6 +948,8 @@ static byte[] calculateCheckSum(String fname) {

@SuppressWarnings("removal")
public static Stylesheet loadStylesheet(final String fname) {
// KCR: FIXME: Remove the try / catch -- the entire body of the catch
// is unreachable without a security manager
try {
return loadStylesheetUnPrivileged(fname);
} catch (java.security.AccessControlException ace) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
import java.net.http.HttpResponse;
import java.net.http.HttpTimeoutException;
import java.nio.ByteBuffer;
import java.security.AccessControlException;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.time.Duration;
Expand Down Expand Up @@ -576,8 +575,6 @@ private Void didFail(final Throwable th) {
throw th;
} catch (MalformedURLException ex) {
errorCode = LoadListenerClient.MALFORMED_URL;
} catch (@SuppressWarnings("removal") AccessControlException ex) {
errorCode = LoadListenerClient.PERMISSION_DENIED;
} catch (UnknownHostException ex) {
errorCode = LoadListenerClient.UNKNOWN_HOST;
} catch (NoRouteToHostException ex) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
import java.net.URLDecoder;
import java.net.UnknownHostException;
import java.nio.ByteBuffer;
import java.security.AccessControlException;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.List;
Expand Down Expand Up @@ -186,9 +185,6 @@ private void doRun() {
} catch (MalformedURLException ex) {
error = ex;
errorCode = LoadListenerClient.MALFORMED_URL;
} catch (@SuppressWarnings("removal") AccessControlException ex) {
error = ex;
errorCode = LoadListenerClient.PERMISSION_DENIED;
} catch (UnknownHostException ex) {
error = ex;
errorCode = LoadListenerClient.UNKNOWN_HOST;
Expand Down

0 comments on commit 2261aaf

Please sign in to comment.