Skip to content

Commit 0ac0669

Browse files
committed
Be defensive when accessing properties in SpringRepositorySupport.groovy
See gh-42333
1 parent c347cca commit 0ac0669

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

buildSrc/SpringRepositorySupport.groovy

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,17 @@ def apply(settings) {
3636
}
3737

3838
private def property(settings, name) {
39-
def value = settings.gradle.parent?.rootProject?.findProperty(name)
40-
value = (value != null) ? value : settings.ext.find(name)
39+
def value = null
40+
try {
41+
value = settings.gradle.parent?.rootProject?.findProperty(name)
42+
}
43+
catch (Exception ex) {
44+
}
45+
try {
46+
value = (value != null) ? value : settings.ext.find(name)
47+
}
48+
catch (Exception ex) {
49+
}
4150
value = (value != null) ? value : loadProperty(settings, name)
4251
return value
4352
}

0 commit comments

Comments
 (0)