Skip to content

Commit 190e5e0

Browse files
committed
addendum
1 parent e9c1b62 commit 190e5e0

File tree

2 files changed

+4
-4
lines changed
  • hadoop-common-project/hadoop-kms/src/main/java/org/apache/hadoop/crypto/key/kms/server
  • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/web/resources

2 files changed

+4
-4
lines changed

hadoop-common-project/hadoop-kms/src/main/java/org/apache/hadoop/crypto/key/kms/server/KMS.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,9 @@ public KeyVersion run() throws Exception {
184184
keyVersion = removeKeyMaterial(keyVersion);
185185
}
186186
Map json = KMSUtil.toJSON(keyVersion);
187-
String requestURL = KMSMDCFilter.getURL();
188-
int idx = requestURL.lastIndexOf(KMSRESTConstants.KEYS_RESOURCE);
189-
requestURL = requestURL.substring(0, idx);
187+
//String requestURL = KMSMDCFilter.getURL();
188+
//int idx = requestURL.lastIndexOf(KMSRESTConstants.KEYS_RESOURCE);
189+
//requestURL = requestURL.substring(0, idx);
190190
LOG.trace("Exiting createKey Method.");
191191
// additional head with header("Location", getKeyURI(requestURL, name))
192192
// no longer supported by jersey 2

hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/web/resources/ExceptionHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public Response toResponse(Exception e) {
109109
s = Response.Status.BAD_REQUEST;
110110
} else if (e instanceof IllegalArgumentException) {
111111
s = Response.Status.BAD_REQUEST;
112-
} else if (e != null && e.getCause() != null) {
112+
} else if (e.getCause() != null) {
113113
if (e.getCause() instanceof SecurityException) {
114114
s = Response.Status.FORBIDDEN;
115115
e = (Exception) e.getCause();

0 commit comments

Comments
 (0)