jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting (JIRA)" <j...@apache.org>
Subject [jira] Commented: (JCR-424) PropertyState binary type desirialsation only returns half of content
Date Fri, 26 May 2006 09:36:30 GMT
    [ http://issues.apache.org/jira/browse/JCR-424?page=comments#action_12413412 ] 

Jukka Zitting commented on JCR-424:
-----------------------------------

Merged for 1.0.1 in revision 409611.

> PropertyState binary type desirialsation only returns half of content
> ---------------------------------------------------------------------
>
>          Key: JCR-424
>          URL: http://issues.apache.org/jira/browse/JCR-424
>      Project: Jackrabbit
>         Type: Bug

>   Components: core
>     Versions: 1.0
>  Environment: Jackrabbit checkout revision 399293
>     Reporter: c keller
>     Assignee: Stefan Guggisberg
>     Priority: Minor
>      Fix For: 1.0.1

>
> Create a PropertyState for a binary Property (e.g jcr:data) set a value larger than the
BLOBFileValues#MAX_BUFFER_SIZE  (e.g. 300Kbyte) serialse it.
> On deserialisation the resulting PropertyState's InternalValue's size is only half as
the origianl (e.g. 150Kbyte)
> Most probably this is due to the States InputStream implementation marking bytes twice
to be read.
> Following fix solves the issue for call to #read(byte[], in, int),
> but other Stream methods may fail as well.
> Index: jackrabbit/java/org/apache/jackrabbit/core/state/PropertyState.java
> ===================================================================
> --- jackrabbit/java/org/apache/jackrabbit/core/state/PropertyState.java (revision 399293)
> +++ jackrabbit/java/org/apache/jackrabbit/core/state/PropertyState.java (working  copy)
> @@ -305,7 +305,6 @@
>                                  len = (int) (length - consumed);
>                              }
>                              int read = super.read(b, off, len);
> -                            consumed += read;
>                              return read;
>                          }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message