jbertram commented on code in PR #5477: URL: https://github.com/apache/activemq-artemis/pull/5477#discussion_r1934620939
########## artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/TypedProperties.java: ########## @@ -174,10 +174,10 @@ public Boolean getBooleanProperty(final SimpleString key) throws ActiveMQPropert Object value = doGetProperty(key); if (value == null) { return Boolean.valueOf(null); - } else if (value instanceof Boolean) { - return (Boolean) value; - } else if (value instanceof SimpleString) { - return Boolean.valueOf(((SimpleString) value).toString()); + } else if (value instanceof Boolean boolean1) { + return boolean1; + } else if (value instanceof SimpleString string) { + return Boolean.valueOf(string.toString()); Review Comment: Fixed. ########## artemis-commons/src/main/java/org/apache/activemq/artemis/utils/runnables/AtomicRunnable.java: ########## @@ -23,8 +23,8 @@ public abstract class AtomicRunnable implements Runnable { public static AtomicRunnable checkAtomic(Runnable run) { - if (run instanceof AtomicRunnable) { - return (AtomicRunnable)run; + if (run instanceof AtomicRunnable runnable) { + return runnable; Review Comment: Fixed. -- 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: gitbox-unsubscr...@activemq.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@activemq.apache.org For additional commands, e-mail: gitbox-h...@activemq.apache.org For further information, visit: https://activemq.apache.org/contact