Skip to content

Commit

Permalink
fix #1246: honor ConfigProperties.UNCONFIGURED_PREFIX again (#1248)
Browse files Browse the repository at this point in the history
  • Loading branch information
jungm authored Nov 11, 2024
1 parent 098c541 commit ee0dbf9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,15 @@ protected void processConfigProperties(
// We are going to veto, because it may be a managed bean, and we will use a configurator bean
processAnnotatedType.veto();

// Unconfigured is represented as an empty String in SmallRye Config
String prefix = annotatedType.getAnnotation(ConfigProperties.class).prefix();
if (ConfigProperties.UNCONFIGURED_PREFIX.equals(prefix)) {
prefix = "";
}

// Each config class is both in SmallRyeConfig and managed by a configurator bean.
// CDI requires more beans for injection points due to binding prefix.
ConfigClass properties = ConfigClass.configClass(annotatedType.getJavaClass(),
annotatedType.getAnnotation(ConfigProperties.class).prefix());
ConfigClass properties = ConfigClass.configClass(annotatedType.getJavaClass(), prefix);
configProperties.add(properties);
configPropertiesBeans.add(properties);
}
Expand Down
2 changes: 0 additions & 2 deletions testsuite/tck/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@
<!-- Require updates to MP TCK -->
<excludes>
<exclude>org.eclipse.microprofile.config.tck.ConverterTest</exclude>
<exclude>org.eclipse.microprofile.config.tck.ConfigPropertiesTest</exclude>
<exclude>org.eclipse.microprofile.config.tck.broken.ConfigPropertiesMissingPropertyInjectionTest</exclude>
</excludes>
</configuration>
<executions>
Expand Down

0 comments on commit ee0dbf9

Please # to comment.