tabish121 commented on code in PR #5771: URL: https://github.com/apache/activemq-artemis/pull/5771#discussion_r2140963896
########## artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTUtil.java: ########## @@ -555,7 +555,7 @@ public static <T> T getProperty(Class<T> type, MqttProperties properties, MqttPr } } - return defaultReturnValue == null ? null : defaultReturnValue; + return Objects.requireNonNullElse(defaultReturnValue, null); Review Comment: This would throw if the first was null and the second was checked as the API throws if both are null, possibly this should just be a requireNonNull or it needs different handling -- 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