tonellotto / jdbm2

Automatically exported from code.google.com/p/jdbm2
0 stars 0 forks source link

jdbm.helper.Serialization.writeLongArray(DataOutputStream, long[]) is broken #13

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The following test fails:

  public void testNegativeLongsArray() throws ClassNotFoundException, IOException {
    long[] l = new long[] { -12 };
    Object deserialize = Serialization.deserialize(Serialization.serialize(l));
    assertEquals(l, deserialize);
  }

I think the problem lies in these ifs:
        if(0>=min && max<=255){
There are plenty of such ifs in this method (and may be others). What was meant 
IMO, if
        if(0=<min && max<=255){
(if every value of the array lies between 0 and 255)

Original issue reported on code.google.com by gni...@gmail.com on 3 Jan 2012 at 7:19

GoogleCodeExporter commented 9 years ago
And this test is not run as part of build process.

Original comment by gni...@gmail.com on 3 Jan 2012 at 8:47

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r86.

Original comment by kja...@gmail.com on 11 Jan 2012 at 10:56