Skip to content

Commit

Permalink
Prevent recording configuration coming from Gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
radcortez committed Sep 14, 2023
1 parent cd3dece commit 0bce9d9
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1013,8 +1013,8 @@ private Converter<?> getConverter(SmallRyeConfig config, Field field, ConverterT
* properties in all profiles (active or not), so it is safe to fall back to different default on another
* profile.
* <br>
* We also filter the properties coming from System or Env with the registered roots, because we don't want to
* record properties set by the compiling JVM (or other properties that are only related to the build).
* We also filter the properties coming from System, Env or Build with the registered roots, because we don't
* want to record properties set by the compiling JVM (or other properties that are only related to the build).
*/
private Set<String> getAllProperties(final Set<String> registeredRoots) {
Set<String> properties = new HashSet<>();
Expand All @@ -1023,7 +1023,8 @@ private Set<String> getAllProperties(final Set<String> registeredRoots) {
}

for (ConfigSource configSource : config.getConfigSources()) {
if (configSource instanceof SysPropConfigSource || configSource instanceof EnvConfigSource) {
if (configSource instanceof SysPropConfigSource || configSource instanceof EnvConfigSource
|| "PropertiesConfigSource[source=Build system]".equals(configSource.getName())) {
for (String property : configSource.getPropertyNames()) {
NameIterator ni = new NameIterator(property);
if (ni.hasNext() && PropertiesUtil.isPropertyInRoot(registeredRoots, ni)) {
Expand Down

0 comments on commit 0bce9d9

Please sign in to comment.