[
https://issues.apache.org/jira/browse/SLING-7218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16226783#comment-16226783
]
Konrad Windszus edited comment on SLING-7218 at 10/31/17 1:31 PM:
------------------------------------------------------------------
This is correct. According to DS 1.3 an array property which is not set
defaults to null (irrespective of the configuration property fields default
value which is only evaluated at build time). This is also described in
https://osgi.org/bugzilla/show_bug.cgi?id=208. I would suggest to accept
{{null}} here. Even setting the default to the empty string would not entirely
prevent the NPE as the defaults are only relevant for the web console (i.e. for
the metatype resource). I will come up with a patch for this.
was (Author: kwin):
This is correct. According to DS 1.3 an array property which is not set
defaults to null (irrespective of the configuration property fields default
value which is only evaluated at build time). This is also described in
https://osgi.org/bugzilla/show_bug.cgi?id=208. I would suggest to accept
{{null}} here.
> NPE in org.apache.sling.security.impl.ContentDispositionFilter#activate
> -----------------------------------------------------------------------
>
> Key: SLING-7218
> URL: https://issues.apache.org/jira/browse/SLING-7218
> Project: Sling
> Issue Type: Bug
> Components: Extensions
> Reporter: Antonio Sanso
> Assignee: Antonio Sanso
>
> {noformat}
> 09.10.2017 07:05:55.216 *ERROR* [FelixStartLevel] org.apache.sling.security
> [org.apache.sling.security.impl.ContentDispositionFilter(96)] The activate
> method has thrown an exception (java.lang.NullPointerException)
> java.lang.NullPointerException: null
> at java.util.Objects.requireNonNull(Objects.java:203)
> at java.util.Arrays$ArrayList.<init>(Arrays.java:3813)
> at java.util.Arrays.asList(Arrays.java:3800)
> 09.10.2017 07:05:55.219 *ERROR* [FelixDispatchQueue] org.apache.sling.engine
> FrameworkEvent ERROR (org.osgi.framework.ServiceException: Service factory
> returned null. (Component:
> org.apache.sling.security.impl.ContentDispositionFilter (96)))
> org.osgi.framework.ServiceException: Service factory returned null.
> (Component: org.apache.sling.security.impl.ContentDispositionFilter (96))
> at
> org.apache.felix.framework.ServiceRegistrationImpl.getFactoryUnchecked(ServiceRegistrationImpl.java:380)
> at
> org.apache.felix.framework.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:247)
> at
> org.apache.felix.framework.ServiceRegistry.getService(ServiceRegistry.java:350)
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)