Hello Henry,
please see my comments regrading the fallthrough warnings inline.
On 2/20/2014 12:05 PM, Henry Jen wrote:
On 02/19/2014 02:59 PM, Henry Jen wrote:
On 02/19/2014 01:46 PM, Phil Race wrote:
W.r.t the following change ...
http://cr.openjdk.java.net/~henryjen/jdk9/8033716/1/webrev/src/share/classes/com/sun/imageio/plugins/jpeg/DHTMarkerSegment.java.sdiff.html
145 class Htable implements Cloneable {
...
<208 protected Object clone() {
208 protected Htable clone()
---------
exactly what warning is this suppressing ?
This eliminate "unchecked" cast warning when calling this method to get
an instance with correct class type.
That's not exactly correct, it just eliminate the need to cast, not
warning.
Would you advice to revert them or keep it?
Also, I noted there are a couple fallthrough warnings, the
BMPImageReader one seems valid and should be fixed while the others
looks correct, but I am not exactly sure about the image format, so I
think I'll just list it here and perhaps someone with expertise can
review them?
/home/hjen/ws/9-client/jdk/src/share/classes/com/sun/imageio/plugins/bmp/BMPImageReader.java:916:
warning: [fallthrough] possible fall-through into case
case VERSION_4_8_BIT:
^
This warning needs to be fixed: the case VERSION_4_4_BIT does not have
the break operator.
/home/hjen/ws/9-client/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReader.java:429:
warning: [fallthrough] possible fall-through into case
case 0: // not a marker, just a data 0xff
^
This case is correct, the warning probably should be suppressed.
/home/hjen/ws/9-client/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriter.java:1554:
warning: [fallthrough] possible fall-through into case
case ColorSpace.TYPE_CMYK:
^
This warning needs to be fixed: the case ColorSpace.TYPE_3CLR missed the
break operator.
/home/hjen/ws/9-client/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriter.java:1593:
warning: [fallthrough] possible fall-through into case
case ColorSpace.TYPE_CMYK:
^
This warning needs to be fixed: the case ColorSpace.TYPE_3CLR missed the
break operator.
/home/hjen/ws/9-client/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriter.java:1639:
warning: [fallthrough] possible fall-through into case
case ColorSpace.TYPE_CMYK:
This warning needs to be fixed: the case ColorSpace.TYPE_3CLR missed the
break operator.
Thanks,
Andrew
Cheers,
Henry