abhishekgarg18 commented on a change in pull request #8:
URL:
https://github.com/apache/sling-org-apache-sling-auth-core/pull/8#discussion_r607765551
##########
File path:
src/main/java/org/apache/sling/auth/core/impl/AuthenticationRequirementsManager.java
##########
@@ -390,7 +390,7 @@ private void addService(final ResourceMapper mapper, final
ServiceReference<?> r
private void modifiedService(final ResourceMapper mapper, final
ServiceReference<?> ref) {
final String[] authReqPaths =
Converters.standardConverter().convert(ref.getProperty(AuthConstants.AUTH_REQUIREMENTS)).to(String[].class);
final Long id = (Long)ref.getProperty(Constants.SERVICE_ID);
- if ( authReqPaths.length > 0 ) {
+ if ( authReqPaths != null && authReqPaths.length > 0 ) {
Review comment:
weird,but we got null pointer exception in authReqPaths in
**org.apache.sling.auth.core-1.5.0** and adding null check solved the problem
for us.
Exception in thread "pool-15-thread-1" java.lang.NullPointerException
at
org.apache.sling.auth.core.impl.SlingAuthenticatorServiceListener.modifiedService(SlingAuthenticatorServiceListener.java:369)
which is
https://github.com/apache/sling-org-apache-sling-auth-core/blob/org.apache.sling.auth.core-1.5.0/src/main/java/org/apache/sling/auth/core/impl/SlingAuthenticatorServiceListener.java#L369
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]