Loading projects/cadcAccessControl/src/ca/nrc/cadc/ac/client/UserClient.java +29 −26 Original line number Diff line number Diff line Loading @@ -148,7 +148,21 @@ public class UserClient HttpDownload download = new HttpDownload(url, out); download.run(); this.handleThrowable(download); int responseCode = download.getResponseCode(); if (responseCode == 404) // not found { return; } if (responseCode != 200) { String message = "Error calling /ac to augment subject"; if (download.getThrowable() != null) { throw new IllegalStateException(message, download.getThrowable()); } throw new IllegalStateException(message); } subject.getPrincipals().clear(); subject.getPrincipals().addAll(this.getPrincipals(out)); } Loading Loading @@ -192,17 +206,6 @@ public class UserClient } } protected void handleThrowable(HttpDownload download) { Throwable throwable = download.getThrowable(); if (throwable != null) { log.debug("handleThrowable(): throwable (" + download .getResponseCode() + ")", throwable); throw new IllegalStateException(throwable.getMessage()); } } protected URL getURL(Principal principal) { try Loading Loading
projects/cadcAccessControl/src/ca/nrc/cadc/ac/client/UserClient.java +29 −26 Original line number Diff line number Diff line Loading @@ -148,7 +148,21 @@ public class UserClient HttpDownload download = new HttpDownload(url, out); download.run(); this.handleThrowable(download); int responseCode = download.getResponseCode(); if (responseCode == 404) // not found { return; } if (responseCode != 200) { String message = "Error calling /ac to augment subject"; if (download.getThrowable() != null) { throw new IllegalStateException(message, download.getThrowable()); } throw new IllegalStateException(message); } subject.getPrincipals().clear(); subject.getPrincipals().addAll(this.getPrincipals(out)); } Loading Loading @@ -192,17 +206,6 @@ public class UserClient } } protected void handleThrowable(HttpDownload download) { Throwable throwable = download.getThrowable(); if (throwable != null) { log.debug("handleThrowable(): throwable (" + download .getResponseCode() + ")", throwable); throw new IllegalStateException(throwable.getMessage()); } } protected URL getURL(Principal principal) { try Loading