JDK-6590255 : missing breaks in switch statements in com.sun.imageio.plugins.jpeg.JPEGImageWriter
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.imageio
  • Affected Version: 7,8
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2007-08-07
  • Updated: 2015-06-12
  • Resolved: 2015-06-12
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9Resolved
Related Reports
Duplicate :  
Duplicate :  
Description
com.sun.imageio.plugins.jpeg.JPEGImageWriter

The following three methods have the same bug :
    private int getSrcCSType(ColorModel cm) 
    private int getDestCSType(ImageTypeSpecifier destType)
    private int getDefaultDestCSType(ColorModel cm)

which is that the switch statement falls through to the next
case (missing break :)
         case ColorSpace.TYPE_3CLR:
                if (cs == JPEG.YCC) {
                    if (alpha) {
                        retval = JPEG.JCS_YCCA;
                    } else {
                        retval = JPEG.JCS_YCC;
                    }
                }
            case ColorSpace.TYPE_CMYK:
                retval = JPEG.JCS_YCCK;
                break;

Comments
Please re-open if - if fix is in progress or on the plan to fix soon - if this is a P3 (file as P3, not P4)
14-03-2014