[ https://issues.apache.org/jira/browse/OAK-9801?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Joerg Hoh updated OAK-9801: --------------------------- Description: Many operations of {{SessionImpl}} require non-null parameters and ensure this by using the {{checkNotNull}} method of Google Commons. If actually provided a null value, it can look like this: {noformat} org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Uncaught Throwable java.lang.NullPointerException: null at org.apache.jackrabbit.oak.jcr.session.SessionImpl.getNamespaceURI(SessionImpl.java:788) [org.apache.jackrabbit.oak-jcr:1.42.0] {noformat} This NPE because of the failed validation is non-distinguishable from a "regular" NPE. We should use the version of {{checkNotNull}} which allows to provide an error string to indicate that the parameter validation failed. was: Many operations of {{SessionImpl}} require non-null parameters and ensure this by using the {{checkNotNull}} method of Google Commons. If actually provided a null value, it can look like this: {noformat} org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Uncaught Throwable java.lang.NullPointerException: null at org.apache.jackrabbit.oak.jcr.session.SessionImpl.getNamespaceURI(SessionImpl.java:788) [org.apache.jackrabbit.oak-jcr:1.42.0] {noformat} This NPE because of the failed is non-distinguishable from a "regular" NPE. We should use the version of {{checkNotNull}} which allows to provide an error string to indicate that the parameter validation failed. > Many SessionImpl operations just log a NPE if null values provided > ------------------------------------------------------------------ > > Key: OAK-9801 > URL: https://issues.apache.org/jira/browse/OAK-9801 > Project: Jackrabbit Oak > Issue Type: Improvement > Components: jcr > Reporter: Joerg Hoh > Priority: Major > Fix For: 1.42.0 > > > Many operations of {{SessionImpl}} require non-null parameters and ensure > this by using the {{checkNotNull}} method of Google Commons. > If actually provided a null value, it can look like this: > {noformat} > org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Uncaught > Throwable > java.lang.NullPointerException: null > at > org.apache.jackrabbit.oak.jcr.session.SessionImpl.getNamespaceURI(SessionImpl.java:788) > [org.apache.jackrabbit.oak-jcr:1.42.0] > {noformat} > This NPE because of the failed validation is non-distinguishable from a > "regular" NPE. We should use the version of {{checkNotNull}} which allows to > provide an error string to indicate that the parameter validation failed. -- This message was sent by Atlassian Jira (v8.20.7#820007)