gtully commented on a change in pull request #3928:
URL: https://github.com/apache/activemq-artemis/pull/3928#discussion_r791834202



##########
File path: 
artemis-commons/src/main/java/org/apache/activemq/artemis/utils/uri/BeanSupport.java
##########
@@ -35,18 +35,27 @@
 public class BeanSupport {
 
    private static final BeanUtilsBean beanUtils = new BeanUtilsBean();
+   private static final Map<Converter, Class> customConverters = new 
HashMap<>();
 
    static {
-      // This is to customize the BeanUtils to use Fluent Proeprties as well
+      // This is to customize the BeanUtils to use Fluent Properties as well
       beanUtils.getPropertyUtils().addBeanIntrospector(new 
FluentPropertyBeanIntrospectorWithIgnores());
    }
 
    public static void registerConverter(Converter converter, Class type) {
       synchronized (beanUtils) {
          beanUtils.getConvertUtils().register(converter, type);
+         customConverters.put(converter, type);
       }
    }
 
+   public static void customise(BeanUtilsBean bean) {
+      for (Map.Entry<Converter, Class> existing : customConverters.entrySet()) 
{
+         bean.getConvertUtils().register(existing.getKey(), 
existing.getValue());
+      }

Review comment:
       correct, good catch. thanks




-- 
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]


Reply via email to