commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: svn commit: r1552745 - /commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/compressors/z/ZCompressorInputStream.java
Date Fri, 20 Dec 2013 17:42:23 GMT
On 2013-12-20, Gary Gregory wrote:

> On Fri, Dec 20, 2013 at 12:21 PM, Emmanuel Bourg <ebourg@apache.org> wrote:

>> Le 20/12/2013 18:18, ggregory@apache.org a écrit :

>>> Remove some unnecessary parentheses.

>> I'd argue they make the code easier to read. Reading bit shifting code
>> is quite painful, some parentheses help greatly.


> That's why it's only "some" and not "all" unnecessary parentheses.

> IMO:

>    tableSize = (1 << 8);

agree in this case, but not with

-            value |= (nextByte << (8 * i));
+            value |= nextByte << 8 * i;

<http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZFile.java?r1=1552740&r2=1552739&pathrev=1552740>

at least I need to think about it to be really sure * has precedence
over <<

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message