Skip to content

Commit

Permalink
Fix admingui has some unhandled messages
Browse files Browse the repository at this point in the history
Signed-off-by: kaido207 <kaido.hiroki@fujitsu.com>
  • Loading branch information
kaido207 committed Oct 31, 2023
1 parent 50b6842 commit b56e762
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 15 deletions.
Expand Up @@ -205,9 +205,7 @@ public Map<String, Object> getResponse() {
// Decode JSON
result.put("data", JSONUtil.jsonToJava(responseBody));
} else {
// Unsupported Response Format!
System.out.println("Unsupported Response Format: '"
+ contentType + "'!");
Logger.getLogger(RestResponse.class.getName()).log(Level.WARNING, "Unsupported Response Format: '" + contentType + "'!");
}
}

Expand Down
Expand Up @@ -543,9 +543,6 @@ protected static MultivaluedMap buildMultivalueMap(Map<String, Object> payload)
} else {
// formData.putSingle(key, (value != null) ? value.toString() : value);
try {
if (key.equals("availabilityEnabled")) {
System.out.println("================== availabilityEnabled skipped ");
}
formData.putSingle(key, value);
} catch (ClassCastException ex) {
Logger logger = GuiUtil.getLogger();
Expand Down
Expand Up @@ -207,8 +207,7 @@ public static void getAllSingleMapRows(HandlerContext handlerCtx) {
try {
handlerCtx.setOutputValue("Rows", data.get(0));
} catch (Exception ex) {
// TODO alert user, log exception
System.out.println("!!!! getAllSingleMapRows() Throws Exception: " + ex.toString());
GuiUtil.prepareException(handlerCtx, ex);
}

}
Expand Down
Expand Up @@ -51,8 +51,7 @@ public static Object invoke(String objectName, String operationName, Object[] pa
Object result = invoke(new ObjectName(objectName), operationName, params, signature);
return result;
} catch (javax.management.MalformedObjectNameException ex) {
System.out.println("MalformedObjectNameException: " + objectName);
throw new RuntimeException(ex);
throw new RuntimeException(objectName + " is MalformedObjectName.", ex);
}
}

Expand Down Expand Up @@ -90,8 +89,7 @@ public static void setAttribute(String objectName, Attribute attributeName) {
try {
setAttribute(new ObjectName(objectName), attributeName);
} catch (javax.management.MalformedObjectNameException ex) {
System.out.println("MalformedObjectNameException: " + objectName);
throw new RuntimeException(ex);
throw new RuntimeException(objectName + " is MalformedObjectName.", ex);
}
}

Expand Down
Expand Up @@ -215,7 +215,6 @@ public static void getPhysicalDestinations(HandlerContext handlerCtx) {
}

} catch (Exception ex) {
System.out.println("invoke: " + OBJECT_DEST_MGR + ", method = " + OP_LIST_DESTINATIONS);
GuiUtil.handleException(handlerCtx, ex);
}
handlerCtx.setOutputValue("result", result);
Expand Down
Expand Up @@ -330,8 +330,7 @@ public Map<String, List<URL>> getResources(String name) {
} catch (Exception ex) {
// Ignore b/c this should not ever happen, we're not
// changing the URL
System.out.println(
"ConsolePluginService: URL Copy Failed!");
logger.log(Level.INFO, "ConsolePluginService: URL Copy Failed!");
}
}

Expand Down

0 comments on commit b56e762

Please sign in to comment.