Since its returning an array index into theIHDR_bitDepths array I think this should be written as

IHDR_bitDepth =IHDR_bitDepths[getEnumeratedAttribute(node, "bitDepth",  
IHDR_bitDepths)];

.. but ensuring the line <=80 chars long

Also note that this is a complete duplicate of
https://bugs.openjdk.java.net/browse/JDK-4991647

Always remember to look for duplicates !
So I have closed 8041460 and you should push under 4991647 - once
the code is fixed and reviewed.

I have assigned 4991647 to you.


 -phil.



On 6/23/2014 6:09 AM, Andrew Brygin wrote:
Hello Mikhail,

 the fix looks fine to me.

Thanks,
Andrew

On 6/9/2014 10:32 PM, mikhail cherkasov wrote:
Hi all,

please review the fix:
http://cr.openjdk.java.net/~mcherkas/8041460/webrev.02/
for the following bug:
https://bugs.openjdk.java.net/browse/JDK-8041460

The problem is that during merging of metadata trees we take index of IHDR_bitDepths and set this value to IHDR_bitDepth, but IHDR_bitDepth requires a real number of bits. IHDR_bitDepths - store all valid values: "1", "2", "4", "8", "16", so to get
valid value we need: 1 << index.

Thanks,
Mikhail.



Reply via email to