Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-23250

MicroProfileConfigConvertersTestCase uses Converter<String> that converts also Resteasy values [xp-3]

XMLWordPrintable

      The MicroProfileConfigConvertersTestCase in testsuite/integration/microprofile cannot run standalone (-Dtest=MicroProfileConfigConvertersTestCase) because it uses HighPriorityStringConverter1 that implements Converter<String> which will convert all String config injections which are now also used in RESTEasy (for instance [here|https://github.com/resteasy/Resteasy/blob/3.15/resteasy-jaxrs/src/main/java/org/jboss/resteasy/plugins/server/servlet/ConfigurationBootstrap.java#L272). The use of Converter<String>, in general, is wrong because we don't want to change all String injections. Converters are intended for user custom types.

      Note that the test passes if some other test that will let RESTEasy initialize correctly is run before it (for instance MicroProfileConfigTestCase) and this is why we didn't notice this problem before. However, AdoptOpenJDK-11.0.11+9 runs the tests in a different order and runs MicroProfileConfigConvertersTestCase first so anyone running AdoptOpenJDK essentially cannot run the test suite.

            mstefank Martin Stefanko
            mstefank Martin Stefanko
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: