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 (Created) (JIRA)" <ji...@apache.org> on 2011/11/30 22:37:40 UTC

[jira] [Created] (JCR-3163) NPE in RepositoryServiceImpl.getPropertyInfo()

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.4, 2.3.3
            Reporter: 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

        

[jira] [Assigned] (JCR-3163) NPE in RepositoryServiceImpl.getPropertyInfo()

Posted by "Tobias Bocanegra (Assigned) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-3163?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tobias Bocanegra reassigned JCR-3163:
-------------------------------------

    Assignee: 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: angela
>             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

        

[jira] [Updated] (JCR-3163) NPE in RepositoryServiceImpl.getPropertyInfo()

Posted by "Jukka Zitting (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-3163?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jukka Zitting updated JCR-3163:
-------------------------------

    Fix Version/s:     (was: 2.4)
                   2.3.5
    
> 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.3.5
>
>
> 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

        

[jira] [Assigned] (JCR-3163) NPE in RepositoryServiceImpl.getPropertyInfo()

Posted by "Tobias Bocanegra (Assigned) (JIRA)" <ji...@apache.org>.
     [ 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

        

[jira] [Resolved] (JCR-3163) NPE in RepositoryServiceImpl.getPropertyInfo()

Posted by "Tobias Bocanegra (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-3163?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tobias Bocanegra resolved JCR-3163.
-----------------------------------

    Resolution: Fixed

fixed for good and added test-case (thanks 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

        

[jira] [Commented] (JCR-3163) NPE in RepositoryServiceImpl.getPropertyInfo()

Posted by "Tobias Bocanegra (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-3163?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13160374#comment-13160374 ] 

Tobias Bocanegra commented on JCR-3163:
---------------------------------------

committed fix as mentioned above in revision 1208818, please review.
                
> 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
>             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