Skip to content

Commit f136f76

Browse files
hansenmcrjrudin
authored andcommitted
test to see if metaClass properties are corbOptions first
In more recent versions of Gradle, some of the properties, such as "argsString" and "validators" throw exceptions. We can avoid that by ensuring that the property name is a corbOption and only acecssing the property object if it is. resolves issue 373
1 parent 4730db0 commit f136f76

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/main/groovy/com/marklogic/gradle/task/CorbTask.groovy

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,11 @@ XQUERY-MODULE".tokenize(',')
153153
this.metaClass.getProperties().collectEntries {
154154
String corbOptionKey = CORB_PROPERTY_PREFIX + it.name.capitalize()
155155
//evaluate whether a value is set and the name matches the corbOptions key pattern
156-
if (this[it.name] && corbOptions[corbOptionKey]) {
157-
[(corbOptions[corbOptionKey]): this[it.name] ]
158-
} else {
159-
[:]
160-
}
156+
if (corbOptions[corbOptionKey] && this[it.name]) {
157+
[(corbOptions[corbOptionKey]): this[it.name] ]
158+
} else {
159+
[:]
160+
}
161161
}
162162
}
163163

0 commit comments

Comments
 (0)