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

PIT: BufferedImage.flush() throws NPE in some cases

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 5.0
    • Fix Version/s: 5.0
    • Component/s: client-libs
    • Labels:
    • Subcomponent:
      2d
    • Resolved In Build:
      tiger
    • CPU:
      generic, x86
    • OS:
      generic, windows_2000, windows_xp

      Description

      Calling BufferedImage.flush() before that image is ever rendered to or copied
      from will cause a NullPointerException to be thrown. The following testcase
      reproduces the problem easily on the latest 2D nightly builds:

      import java.awt.image.BufferedImage;

      public class FlushTest {

          public static void main(String[] args) {
              try {
                  BufferedImage bi = new BufferedImage(10, 10,
                                                       BufferedImage.TYPE_INT_RGB);
                  bi.flush();
              } catch (NullPointerException npe) {
                  throw new RuntimeException("Test failed: NPE thrown in " +
                                             "BufferedImage.flush()");
              }
          }
      }

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                campbell Christopher Campbell (Inactive)
                Reporter:
                campbell Christopher Campbell (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: