You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Stefan Seifert (JIRA)" <ji...@apache.org> on 2018/11/05 17:35:00 UTC
[jira] [Assigned] (SLING-8066) MockProperty.setValue(final String[]
newValues) throws null pointer exception
[ https://issues.apache.org/jira/browse/SLING-8066?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stefan Seifert reassigned SLING-8066:
-------------------------------------
Assignee: Stefan Seifert
thanks for the PR.
the solution you implemented avoids the NPE - but behaves different from a real JCR implementation in my pov. i've tested it with an oak repository - the property gets removed if set to null, and is not set to a null value.
i've prepared an alternative PR as a solution - [~pankajpr] can you double-check if this also solves your problem?
https://github.com/apache/sling-org-apache-sling-testing-jcr-mock/pull/4
> MockProperty.setValue(final String[] newValues) throws null pointer exception
> ------------------------------------------------------------------------------
>
> Key: SLING-8066
> URL: https://issues.apache.org/jira/browse/SLING-8066
> Project: Sling
> Issue Type: Bug
> Components: Testing
> Affects Versions: Testing JCR Mock 1.4.0
> Reporter: Pankaj Parashar
> Assignee: Stefan Seifert
> Priority: Blocker
> Fix For: Testing JCR Mock 1.4.2
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> There is no null check in this api method. In our case product code is passing a null value in the below form for a multivalve property.
> currentNode.setProperty(propertyName, (String[])null);
> MockProperty api throws null pointer exception when we use JCR mocking.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)