This is an automated email from the ASF dual-hosted git repository.
jensg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git
The following commit(s) were added to refs/heads/master by this push:
new e254b21 fix nullptr exception in publishing.gradle
e254b21 is described below
commit e254b21c73c9894410f07304461057af9a8fe86b
Author: Jens Geyer <[email protected]>
AuthorDate: Wed Feb 24 20:39:24 2021 +0100
fix nullptr exception in publishing.gradle
---
lib/java/gradle/publishing.gradle | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lib/java/gradle/publishing.gradle
b/lib/java/gradle/publishing.gradle
index 029bff9..481fcbc 100644
--- a/lib/java/gradle/publishing.gradle
+++ b/lib/java/gradle/publishing.gradle
@@ -86,8 +86,10 @@ def configurePom(pom) {
pom.whenConfigured {
// Fixup the scope for servlet-api to be 'provided' instead of
'compile'
dependencies.find { dep -> dep.groupId == 'javax.servlet' &&
dep.artifactId == 'servlet-api' }.with {
- // it.optional = true
- it.scope = 'provided'
+ if(it != null) {
+ // it.optional = true
+ it.scope = 'provided'
+ }
}
}
}