You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Alexander Klimetschek (JIRA)" <ji...@apache.org> on 2013/11/21 05:31:35 UTC

[jira] [Comment Edited] (OAK-956) SegmentStream doesn't implement the method available()

    [ https://issues.apache.org/jira/browse/OAK-956?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13828479#comment-13828479 ] 

Alexander Klimetschek edited comment on OAK-956 at 11/21/13 4:30 AM:
---------------------------------------------------------------------

Here is a test case reproducing the issue (in my git fork):

https://github.com/alexkli/jackrabbit-oak/commit/760dc1d613f1d0de4fb83084abb97c82d17c91a2
([patch|https://github.com/alexkli/jackrabbit-oak/commit/760dc1d613f1d0de4fb83084abb97c82d17c91a2.patch])

And here is a fix:

https://github.com/alexkli/jackrabbit-oak/commit/004b401ce74185b6343a7b8b27bccc5397a6da23
([patch|https://github.com/alexkli/jackrabbit-oak/commit/004b401ce74185b6343a7b8b27bccc5397a6da23.patch])

I am not sure what happens if there is an integer overflow (length > MAX_INT). {{available()}} is allowed to be just an estimate, so all it needs to do is return at least 1 if it knows there is more data available.


was (Author: alexander.klimetschek):
Here is a test case reproducing the issue (in my git fork):

https://github.com/alexkli/jackrabbit-oak/commit/760dc1d613f1d0de4fb83084abb97c82d17c91a2

And here is a fix:

https://github.com/alexkli/jackrabbit-oak/commit/004b401ce74185b6343a7b8b27bccc5397a6da23

I am not sure what happens if there is an integer overflow (length > MAX_INT). {{available()}} is allowed to be just an estimate, so all it needs to do is return at least 1 if it knows there is more data available.

> SegmentStream doesn't implement the method available()
> ------------------------------------------------------
>
>                 Key: OAK-956
>                 URL: https://issues.apache.org/jira/browse/OAK-956
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: core
>            Reporter: Antonio Sanso
>
>  org.apache.jackrabbit.oak.plugins.segment.SegmentStream doesn't implement the method available()
> {code}
> Value.getStream().available()
> {code}
> will always return 0



--
This message was sent by Atlassian JIRA
(v6.1#6144)