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

TrayIcon constructor throws NPE instead of documented IAE

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b66
    • CPU:
      x86
    • OS:
      windows
    • Verification:
      Verified

      Description

      Constructor java.awt.TrayIcon(Image) says

      "@throws IllegalArgumentException if <code>image</code> is <code>null</code>"

      but it uses method TrayIcon.setImage(Image) that throws (specified) NPE.

      Tests expect IAE to be thrown from TrayIcon constructors for null image, receive (unexpected) NPE and fail.

      JCK 7 b06
      JDK 7 b36
      Platforms:
       - failed on Windows 2003
       - passed on Solaris Sparc

      The following JCK tests fail due to this problem:

      api/java_awt/TrayIcon/index.html#Ctors[testNullImageResultsInIAE2007]
      api/java_awt/TrayIcon/index.html#Ctors[testNullImageResultsInIAE2004]
      api/java_awt/TrayIcon/index.html#Ctors[testNullImageResultsInIAE2002]
      Reproducible on Solaris as well.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dcherepanov Dmitry Cherepanov
              Reporter:
              dbessono Dmitry Bessonov
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: