You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Jukka Zitting (JIRA)" <ji...@apache.org> on 2012/07/12 11:11:33 UTC

[jira] [Created] (JCR-3384) TCK: BinaryPropertyTest.testGetLengthJcr2() fails with a multi-valued binary property

Jukka Zitting created JCR-3384:
----------------------------------

             Summary: TCK: BinaryPropertyTest.testGetLengthJcr2() fails with a multi-valued binary property
                 Key: JCR-3384
                 URL: https://issues.apache.org/jira/browse/JCR-3384
             Project: Jackrabbit Content Repository
          Issue Type: Bug
          Components: jackrabbit-jcr-tests
    Affects Versions: 2.5
            Reporter: Jukka Zitting


The {{BinaryPropertyTest}} class returns {{null}} from {{getPropertyIsMultivalued}}, meaning that it doesn't care if the property being tested is multi-valued or not. And in most cases that is true since the class uses {{PropertyUtil.getValue}} utility method to get the (first) value of the property. However, the {{testGetLengthJcr2}} method calls {{Property.getValue}} directly, which breaks the test if the property being tested happens to be multi-valued.

--
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-3384) TCK: BinaryPropertyTest.testGetLengthJcr2() fails with a multi-valued binary property

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

Julian Reschke commented on JCR-3384:
-------------------------------------

So all that needs to be done is to replace

          long bytes = PropertyUtil.countBytes(prop.getValue());

by

          long bytes = PropertyUtil.countBytes(PropertyUtil.getValue(prop));

?
                
> TCK: BinaryPropertyTest.testGetLengthJcr2() fails with a multi-valued binary property
> -------------------------------------------------------------------------------------
>
>                 Key: JCR-3384
>                 URL: https://issues.apache.org/jira/browse/JCR-3384
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-jcr-tests
>    Affects Versions: 2.5
>            Reporter: Jukka Zitting
>
> The {{BinaryPropertyTest}} class returns {{null}} from {{getPropertyIsMultivalued}}, meaning that it doesn't care if the property being tested is multi-valued or not. And in most cases that is true since the class uses {{PropertyUtil.getValue}} utility method to get the (first) value of the property. However, the {{testGetLengthJcr2}} method calls {{Property.getValue}} directly, which breaks the test if the property being tested happens to be multi-valued.

--
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-3384) TCK: BinaryPropertyTest.testGetLengthJcr2() fails with a multi-valued binary property

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

Jukka Zitting resolved JCR-3384.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 2.5.1
         Assignee: Jukka Zitting

Indeed. Fixed in revision 1360650.
                
> TCK: BinaryPropertyTest.testGetLengthJcr2() fails with a multi-valued binary property
> -------------------------------------------------------------------------------------
>
>                 Key: JCR-3384
>                 URL: https://issues.apache.org/jira/browse/JCR-3384
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-jcr-tests
>    Affects Versions: 2.5
>            Reporter: Jukka Zitting
>            Assignee: Jukka Zitting
>             Fix For: 2.5.1
>
>
> The {{BinaryPropertyTest}} class returns {{null}} from {{getPropertyIsMultivalued}}, meaning that it doesn't care if the property being tested is multi-valued or not. And in most cases that is true since the class uses {{PropertyUtil.getValue}} utility method to get the (first) value of the property. However, the {{testGetLengthJcr2}} method calls {{Property.getValue}} directly, which breaks the test if the property being tested happens to be multi-valued.

--
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