Uploaded image for project: 'WildFly WIP'
  1. WildFly WIP
  2. WFWIP-77

smallrye-config: Converter Priority is not upheld

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a Bug
    • Icon: Blocker Blocker
    • MP Config
    • None
    • Hide

      1. checkout and build https://github.com/mjurc/wildfly/tree/WFLY-10522
      2. cd testsuite/integration/basic
      3. mvn clean test -Dtest="MicroProfileConfigConvertersTestCase"

      Show
      1. checkout and build https://github.com/mjurc/wildfly/tree/WFLY-10522 2. cd testsuite/integration/basic 3. mvn clean test -Dtest="MicroProfileConfigConvertersTestCase"

      Consider a scenario with two Coverter services available in service loader:

      @Priority(101)
      public class Return101Converter implements Converter<Integer> {
      
          @Override
          public Integer convert(String value) {
              return 101;
          }
      }
      
      @Priority(102)
      public class Return102Converter implements Converter<Integer> {
      
          @Override
          public Integer convert(String value) {
              return 102;
          }
      }
      

      The @Priority of the Converter services is not considered, instead, their order in provider configuration file is - the first implementation will always be preferred.

              jmesnil1@redhat.com Jeff Mesnil
              mjurc@redhat.com Michal Jurc
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: