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

REGRESSION: JDialog does not throw HeadlessException anymore due to fix to 630062

XMLWordPrintable

    • 6
    • x86
    • solaris_8

      Filed By : STT SPB (###@###.###)

      JCK : JCK 6.0 b07
      J2SE : FAIL - JDK 6.0 b50
                       PASS - JDK 6.0 b49
      Platform[s] : FAIL - all
      switch/Mode : FAIL - all
      JCK test owner : http://javaweb.eng/jct/sqe/JCK-tck/usr/owners.jto

      Failing Test [s] :
          api/javax_swing/JColorChooser/index.html#Ctor[JColorChooser0003]
          api/javax_swing/JDialog/index.html#decorations[JDialog0019]
          api/javax_swing/JDialog/index.html#Ctor[JDialog2001]
          api/javax_swing/JDialog/index.html#Ctor[JDialog1001]

      Problem description:
      At least the following JDialog constructors

      public JDialog(Frame owner, String title, boolean modal) {
      public JDialog(Dialog owner, String title, boolean modal) {

      throw "java.lang.IllegalArgumentException: headless environment" instead of HeadlessException despite the fact that specification for all JDialog constructors contains

      "
      Throws:
          HeadlessException - if GraphicsEnvironment.isHeadless() returns true.
      "

      this happens because these constructors call
          super(owner, title, modal);

      Specification for Dialog states:
      "
      Throws:
          IllegalArgumentException - when GraphicsEnvironment.isHeadless() returns true
      "

      so JDialog should take care of throwing HeadlessException because Dialog won't do it.


      How to reproduce (SPBDC specific):

      PRODUCT="/set/java/re/jdk/6.0/promoted/ea/b50/binaries/solaris-i586/fastdebug/bin/java"
      # PRODUCT="/set/java/re/jdk/6.0/promoted/ea/b49/binaries/solaris-i586/fastdebug/bin/java"

      $PRODUCT -showversion -Djava.awt.headless=true -Xfuture -classpath /set/stt/jck_promotions/6.0/beta/b07/binaries/JCK-runtime-60/classes -Djava.security.policy=/set/stt/jck_promotions/6.0/beta/b07/binaries/JCK-runtime-60/lib/jck.policy javasoft.sqe.tests.api.javax.swing.JColorChooser.CtorTests -TestCaseID ALL


      PRODUCT="/set/java/re/jdk/6.0/promoted/ea/b50/binaries/solaris-i586/fastdebug/bin/java"
      $PRODUCT -Djava.awt.headless=true -Xfuture -classpath /set/stt/jck_promotions/6.0/beta/b07/binaries/JCK-runtime-60/classes -Djava.security.policy=/set/stt/jck_promotions/6.0/beta/b07/binaries/JCK-runtime-60/lib/jck.policy javasoft.sqe.tests.api.javax.swing.JDialog.CtorTests -TestCaseID ALL


      Please find JTRs attached.

            Unassigned Unassigned
            idergali Ilya Dergalin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: