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

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P4
    • 9
    • Affects Version/s: 7, 8
    • Component/s: 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;

            Assignee:
            Sergey Bylokhov
            Reporter:
            Philip Race
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: