Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6590255

missing breaks in switch statements in com.sun.imageio.plugins.jpeg.JPEGImageWriter

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • 9
    • 7, 8
    • client-libs
    • None

      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;

            serb Sergey Bylokhov
            prr Philip Race
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: