Opened 3 months ago

Closed 3 months ago

#2770 closed defect (fixed)

DataHelperTest.testCompress fails with "length" exception

Reported by: tharvik Owned by:
Priority: minor Milestone: 0.9.48
Component: api/utils Version: 0.9.47
Keywords: Cc:
Parent Tickets: Sensitive: no


When running the junit tests, it fails because it tries with a size-zero array. Skipping the first loop iteration fixes it.


Attachments (1)

datahelpertest-testCompress-do-not-test-empty-array.patch (800 bytes) - added by tharvik 3 months ago.

Download all attachments as: .zip

Change History (2)

comment:1 Changed 3 months ago by zzz

Component: unspecifiedapi/utils
Milestone: undecided0.9.48
Resolution: fixed
Status: newclosed

Thanks for the report and patch.

Zero compress/decompress is supposed to work. The error is actually in DataHelper?.decompress(). A compress() of zero bytes results in 20 bytes. The decompress() check was for 23 bytes, which is the normal overhead.

I broke it in 0.9.47 but didn't notice because our CI is broken.

In 196cc1612af9f27ab72cc53fbb409b7ac63637cd to be 0.9.47-3

Note: See TracTickets for help on using tickets.