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

Always true condition 'level >= 0' in PaletteBuilder.reduceTree

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P5 P5
    • tbd
    • 8, 11, 17, 21, 22, 23
    • client-libs
    • None

      There is a cycle in com.sun.imageio.plugins.common.PaletteBuilder#reduceTree

          protected void reduceTree() {
              int level = reduceList.length - 1;
              while (reduceList[level] == null && level >= 0) {
                  level--;
              }

      Condition 'level >= 0' is always true, because it's called after array access.

            jdv Jayathirth D V
            aturbanov Andrey Turbanov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: