commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dennis Lundberg (JIRA)" <>
Subject [jira] Moved: (COMPRESS-20) Findbugs reports
Date Mon, 23 Mar 2009 22:19:52 GMT


Dennis Lundberg moved SANDBOX-246 to COMPRESS-20:

    Component/s:     (was: Compress)
            Key: COMPRESS-20  (was: SANDBOX-246)
        Project: Commons Compress  (was: Commons Sandbox)

> Findbugs reports
> ----------------
>                 Key: COMPRESS-20
>                 URL:
>             Project: Commons Compress
>          Issue Type: Bug
>            Reporter: Sebb
>            Assignee: Stefan Bodewig
> TarEntry defines equals(TarEntry) method which does not override Object.equals() - is
this intended?
> If so, maybe the method should be called something different such as isSame() to avoid
> BZip2Compressor and ZipArchive return a pointer to a private byte array, thus allowing
external code to modfy the contents of the final array.
> They should return a copy.
> BZip2OutputStream line 1302:   m_block[ m_zptr[ ( lo + hi ) >> 1 ] + d + 1 ] );
> Findbugs says:
> {quote}
> The code computes the average of two integers using either division or signed right shift,
and then uses the result as the index of an array. If the values being averaged are very large,
this can overflow (resulting in the computation of a negative average). Assuming that the
result is intended to be nonnegative, you can use an unsigned right shift instead. In other
words, rather that using (low+high)/2, use (low+high) >>> 1 
> {quote}
> TarArchive line 74 may fail to close zInputStream
> The classes ZipShort, ZipLong and AsiExtraField implement Cloneable but do not define
or use the clone method.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message