You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by da...@apache.org on 2018/06/07 14:51:09 UTC
[sling-org-apache-sling-feature-resolver] branch master updated:
Fix potential NPE
This is an automated email from the ASF dual-hosted git repository.
davidb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-feature-resolver.git
The following commit(s) were added to refs/heads/master by this push:
new def5e7e Fix potential NPE
def5e7e is described below
commit def5e7e6d2472323b965bfc1b1aa36b0ba0d4859
Author: David Bosschaert <bo...@adobe.com>
AuthorDate: Thu Jun 7 15:50:53 2018 +0100
Fix potential NPE
---
.../apache/sling/feature/resolver/ApplicationResolverAssembler.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/main/java/org/apache/sling/feature/resolver/ApplicationResolverAssembler.java b/src/main/java/org/apache/sling/feature/resolver/ApplicationResolverAssembler.java
index 85d1b4f..5d69343 100644
--- a/src/main/java/org/apache/sling/feature/resolver/ApplicationResolverAssembler.java
+++ b/src/main/java/org/apache/sling/feature/resolver/ApplicationResolverAssembler.java
@@ -28,7 +28,6 @@ import org.apache.sling.feature.io.IOUtils;
import org.apache.sling.feature.io.json.FeatureJSONReader;
import org.apache.sling.feature.io.json.FeatureJSONReader.SubstituteVariables;
-import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
@@ -81,7 +80,7 @@ public class ApplicationResolverAssembler {
sortedFeatures = new ArrayList<>();
for (final FeatureResource rsrc : sortedResources) {
Feature f = rsrc.getFeature();
- if (!sortedFeatures.contains(f)) {
+ if (f != null && !sortedFeatures.contains(f)) {
sortedFeatures.add(rsrc.getFeature());
}
}
--
To stop receiving notification emails like this one, please contact
davidb@apache.org.