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

api/java_awt/Event/TfieldEventTests.html#TfieldEventTest0001[TfieldEventTest0001]

XMLWordPrintable

    • generic
    • solaris

      JCK : JCK6.0 b19
      J2SE : FAIL - mustang b74
      Platform[s] : FAIL - Solaris and Linux, still work on windows
      switch/Mode : FAIL - default

      The test api/java_awt/Event/TfieldEventTests.html#TfieldEventTest0001[TfieldEventTest0001] fails on Solaris and Linux platforms *since b74*. Also it works on tiger u6.

      Steps to reproduce:

      compile and run the following class:

      import java.awt.Frame;
      import java.awt.TextField;

      public class TestEvent extends Frame {

          public TestEvent(String s, int cols) {
              TextField t = new TextField(s, cols);
      add(t);
      pack();
      System.exit(0);
          }

          public static void main(String[] args){
      TestEvent te=new TestEvent("", 25);
      }
      }

      This test types nothing at console if ran by mustang b73 or tiger u6, but throws NulPointerException if ran by mustang b74. Example of the exception is:

      [stt-robot@stt-21]~/test$ /set/stt/jdk_promotions/JDK5.0u6/binaries/solaris-sparcv9/jdk1.5.0_06/bin/java -cp . TestEvent
      [stt-robot@stt-21]~/test$ /set/stt/jdk_promotions/JDK6.0/b73/binaries/solaris-sparcv9/jdk1.6.0/bin/java -cp . TestEvent
      [stt-robot@stt-21]~/test$ /set/stt/jdk_promotions/JDK6.0/b74/binaries/solaris-sparcv9/jdk1.6.0/bin/java -cp . TestEvent
      Exception in thread "main" java.lang.NullPointerException
              at javax.swing.JPasswordField.customSetUIProperty(JPasswordField.java:337)
              at javax.swing.LookAndFeel.installProperty(LookAndFeel.java:150)
              at javax.swing.plaf.basic.BasicPasswordFieldUI.installDefaults(BasicPasswordFieldUI.java:58)
              at javax.swing.plaf.basic.BasicTextUI.installUI(BasicTextUI.java:686)
              at javax.swing.plaf.basic.BasicTextFieldUI.installUI(BasicTextFieldUI.java:57)
              at sun.awt.X11.XTextFieldPeer$AWTTextFieldUI.installUI(XTextFieldPeer.java:493)
              at javax.swing.JComponent.setUI(JComponent.java:613)
              at sun.awt.X11.XTextFieldPeer$XAWTTextField.updateUI(XTextFieldPeer.java:660)
              at javax.swing.text.JTextComponent.<init>(JTextComponent.java:305)
              at javax.swing.JTextField.<init>(JTextField.java:207)
              at javax.swing.JPasswordField.<init>(JPasswordField.java:116)
              at javax.swing.JPasswordField.<init>(JPasswordField.java:74)
              at sun.awt.X11.XTextFieldPeer$XAWTTextField.<init>(XTextFieldPeer.java:604)
              at sun.awt.X11.XTextFieldPeer.<init>(XTextFieldPeer.java:59)
              at sun.awt.X11.XToolkit.createTextField(XToolkit.java:757)
              at java.awt.TextField.addNotify(TextField.java:205)
              at java.awt.Container.addNotify(Container.java:2500)
              at java.awt.Window.addNotify(Window.java:528)
              at java.awt.Frame.addNotify(Frame.java:479)
              at java.awt.Window.pack(Window.java:556)
              at TestEvent.<init>(TestEvent.java:9)
              at TestEvent.main(TestEvent.java:15)

            son Oleg Sukhodolsky (Inactive)
            pastepan Pavel Stepanov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: