RFR: JDK-8075774 Small readability and performance improvements for zipfs

Martin Buchholz martinrb at google.com
Tue Mar 24 23:17:49 UTC 2015


On Tue, Mar 24, 2015 at 12:49 AM, Alan Bateman <Alan.Bateman at oracle.com>
wrote:

>
>>  Looks okay but it makes for mix of styles (LL vs. getSig for example).


Yeah, C macros and Java constants are UPPER_CASE.  LL should really be
renamed to something more Javaesque.

I changed pkSigAt to not use increment, making the parallelism more obvious
to human and machine alike.

    private static boolean pkSigAt(byte[] b, int n, int b1, int b2) {
        return b[n] == 'P' & b[n + 1] == 'K' & b[n + 2] == b1 & b[n + 3] ==
b2;
    }



More information about the core-libs-dev mailing list