gemmellr commented on code in PR #5477: URL: https://github.com/apache/activemq-artemis/pull/5477#discussion_r1934304007
########## artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImpl.java: ########## @@ -744,16 +743,16 @@ public void setProperty(final Object bean, String name, final Object value) thro } catch (final NoSuchMethodException e) { throw new InvocationTargetException(e, "Failed to get descriptor for: " + name + " on: " + target.getClass()); } - if (descriptor instanceof MappedPropertyDescriptor) { - if (((MappedPropertyDescriptor) descriptor).getMappedWriteMethod() == null) { + if (descriptor instanceof MappedPropertyDescriptor propertyDescriptor) { + if (propertyDescriptor.getMappedWriteMethod() == null) { Review Comment: This and the leg below could use distinct names, e.g mappedPropertyDescriptor and indexedPropertyDescriptor, to make things more readable. Them both using propertyDescriptor now arguably makes it _less_ readable than originally. -- 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