gemmellr commented on code in PR #5477:
URL: https://github.com/apache/activemq-artemis/pull/5477#discussion_r1934136940
##########
artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/JsonUtil.java:
##########
@@ -70,24 +69,22 @@ public static Object[] fromJsonArray(final JsonArray
jsonArray) throws Exception
for (String key : keys) {
Object innerVal = jsonObject.get(key);
- if (innerVal instanceof JsonArray) {
- innerVal = fromJsonArray(((JsonArray) innerVal));
- } else if (innerVal instanceof JsonString) {
- innerVal = ((JsonString) innerVal).getString();
+ if (innerVal instanceof JsonArray jsonArray1) {
+ innerVal = fromJsonArray(jsonArray1);
+ } else if (innerVal instanceof JsonString string) {
+ innerVal = string.getString();
Review Comment:
```suggestion
if (innerVal instanceof JsonArray innerJsonArray) {
innerVal = fromJsonArray(innerJsonArray);
} else if (innerVal instanceof JsonString innerJsonString) {
innerVal = innerJsonString.getString();
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact