[ 
https://issues.apache.org/jira/browse/JCR-2960?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stefan Guggisberg updated JCR-2960:
-----------------------------------

    Description: 
When a long value assigned to a property is too big, when restarting the server 
the value become 0 !! 

The test pass with versions 1.6.4 and 2.0

  was:
When a long value assigned to a property is too large,  the value is correctly 
read until the repository is restarted. Then the value read is 0 !
( see attached junit test)

The test pass with versions 1.6.4 and 2.0


regression of JCR-2762.

test case: 

any long value > 0x3FFFFFFFFFFFFFFF (i.e. with any of the 2 most significant 
bits set)
causes an overflow on deserialization.

this obviously also includes Long.MAX_VALUE and Long.MIN_VALUE...

example:
long test = 0x3FFFFFFFFFFFFFFFL;
 
BundleWriter.writeVarLong(test);
test == BundleReader.readVarLong()  // => ok

test++;
BundleWriter.writeVarLong(test);
=> BundleReader.readVarLong() returns 0

> Long values not properly stored
> -------------------------------
>
>                 Key: JCR-2960
>                 URL: https://issues.apache.org/jira/browse/JCR-2960
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 2.2.0, 2.2.1, 2.2.4, 2.2.5
>            Reporter: Antoine Brochard
>            Priority: Critical
>         Attachments: LongValueTest.java
>
>
> When a long value assigned to a property is too big, when restarting the 
> server the value become 0 !! 
> The test pass with versions 1.6.4 and 2.0

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to