Skip to content

Commit

Permalink
Merge pull request #35914 from radcortez/gradle-recording
Browse files Browse the repository at this point in the history
Prevent recording configuration coming from Gradle
  • Loading branch information
gsmet authored Sep 18, 2023
2 parents 54df528 + 0bce9d9 commit ff841e3
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 ff841e3

Please sign in to comment.