You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Tobias Bocanegra (Assigned) (JIRA)" <ji...@apache.org> on 2011/12/01 12:05:42 UTC
[jira] [Assigned] (JCR-3163) NPE in
RepositoryServiceImpl.getPropertyInfo()
[ https://issues.apache.org/jira/browse/JCR-3163?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tobias Bocanegra reassigned JCR-3163:
-------------------------------------
Assignee: Tobias Bocanegra (was: angela)
> NPE in RepositoryServiceImpl.getPropertyInfo()
> ----------------------------------------------
>
> Key: JCR-3163
> URL: https://issues.apache.org/jira/browse/JCR-3163
> Project: Jackrabbit Content Repository
> Issue Type: Bug
> Components: jackrabbit-spi2dav
> Affects Versions: 2.3.3, 2.3.4
> Reporter: Tobias Bocanegra
> Assignee: Tobias Bocanegra
> Fix For: 2.4
>
>
> under unknown conditions, i get a NPE in get property info, such as the 'getValue()' of the getstring dav property is null:
> } else if (props.contains(JCR_GET_STRING)) {
> // single valued non-binary property
> String str = props.get(JCR_GET_STRING).getValue().toString();
> QValue qValue = ValueFormat.getQValue(str, propertyType, getNamePathResolver(sessionInfo), getQValueFactory(sessionInfo));
> return new PropertyInfoImpl(propertyId, p, propertyType, qValue);
> } else {
> the other properties in the propset are:
> - getstring: null
> - type: String
> - length: 0
> the property in question is the last property of a node and it's an empty string. the error only occurs on certain usage patterns, but consistently. maybe depending on the fetch-depth or internal cache.
> extending the check to:
> } else if (props.contains(JCR_GET_STRING) && props.get(JCR_GET_STRING).getValue() != null) {
> solves the problem.
>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira