[ 
https://issues.apache.org/jira/browse/JCR-1187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12537516
 ] 

angela commented on JCR-1187:
-----------------------------

hi esteban

the fact that Property.getStream() returns the same stream upon calling the 
method multiple
times is - from my understanding - how JSR-170 specifies the method:

quote from specification:

"6.2.7 Value
[...]
Once a Value object has been read once using getStream(), all subsequent calls 
to getStream() will return the same stream object. This may mean, for example, 
that the stream returned is fully or partially consumed. In order to get a 
fresh stream the Value object must be reacquired via Property.getValue()."

this also applies to Property.getStream, since this method is defined to be

"A shortcut for Property.getValue().getStream()" (quote from 6.2.4 Property 
Read Methods)

> Asking a property twice for it's stream returns the same stream instance
> ------------------------------------------------------------------------
>
>                 Key: JCR-1187
>                 URL: https://issues.apache.org/jira/browse/JCR-1187
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jackrabbit-core
>            Reporter: Esteban Franqueiro
>         Attachments: DataStoreTestUtils.java, TestTwoGetStreams.java
>
>
> If you ask a property stored in the database data store (JCR-1154) for it's 
> associated stream twice, the stream instance returned is the same. This 
> behavior is not consistent with the file data store, which returns a 
> different stream instance each time Property.getStream() is called.
> I'm attaching a test case wich demostrates the issue.
> We're working on this and have a potencial fix for it.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to