[
https://issues.apache.org/jira/browse/SLING-8099?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16683984#comment-16683984
]
ASF GitHub Bot commented on SLING-8099:
---------------------------------------
bosschaert closed pull request #6: SLING-8099 - eliminating NPE condition
URL:
https://github.com/apache/sling-org-apache-sling-feature-extension-content/pull/6
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git
a/src/main/java/org/apache/sling/feature/extension/content/ContentOrderMergeProcessor.java
b/src/main/java/org/apache/sling/feature/extension/content/ContentOrderMergeProcessor.java
index 9289e4c..82ad7db 100644
---
a/src/main/java/org/apache/sling/feature/extension/content/ContentOrderMergeProcessor.java
+++
b/src/main/java/org/apache/sling/feature/extension/content/ContentOrderMergeProcessor.java
@@ -30,7 +30,7 @@
public static final String DEFAULT_CONTENT_START_ORDER =
"default.content.startorder";
private void processFeature(Feature feature, Extension extension) {
- if (feature == null) {
+ if (feature == null || extension == null) {
return;
}
String defaultOrder =
feature.getVariables().get(DEFAULT_CONTENT_START_ORDER);
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Potential NPE condition in ContentOrderMergeProcessor
> -----------------------------------------------------
>
> Key: SLING-8099
> URL: https://issues.apache.org/jira/browse/SLING-8099
> Project: Sling
> Issue Type: Bug
> Components: Feature Model
> Reporter: Dominik Süß
> Priority: Major
>
> When a feature doesn't contain the content-package extension but anyhow
> contains the {{default.content.startorder}} property this currently leads to
> a NullPointerException.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)