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

REGRESSION: Dialog no longer throws IllegalArgumentException

XMLWordPrintable

    • x86
    • windows_xp

      A DESCRIPTION OF THE REGRESSION :
      The following code snippet will throw an IllegalArgumentException in 1.5.0_6, but will not in 1.6 beta 2 March 9 build.

      import java.awt.*;

      public class test1 {
        public static void main(String[] args) {
          new Dialog((Frame)null,"Title",true);
        }
      }

      REPRODUCIBLE TESTCASE OR STEPS TO REPRODUCE:
      Exception in thread "main" java.lang.IllegalArgumentException: null owner window
      at java.awt.Window.ownedInit(Unknown Source)
      at java.awt.Window.<init>(Unknown Source)
      at java.awt.Dialog.<init>(Unknown Source)
      at test1.main(test1.java:5)

      RELEASE LAST WORKED:
      5.0 Update 6

      RELEASE TEST FAILS:
      mustang-beta

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      In 1.5.0_6, the stack trace I receive is:

      Exception in thread "main" java.lang.IllegalArgumentException: null owner window
      at java.awt.Window.ownedInit(Unknown Source)
      at java.awt.Window.<init>(Unknown Source)
      at java.awt.Dialog.<init>(Unknown Source)
      at test1.main(test1.java:5)
      ACTUAL -
      [no output]

            son Oleg Sukhodolsky (Inactive)
            ttzhang Tao Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: