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

Headless Testsuite throws NPE at getLineWidth() for Swing Components

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Duplicate
    • Affects Version/s: 1.4.0
    • Fix Version/s: None
    • Component/s: client-libs
    • Labels:
    • Subcomponent:
      2d
    • CPU:
      generic
    • OS:
      solaris

      Description

      In Solaris Headless Testsuite throws NPE when different methods related to method getLineWidth() is called.

           BEGIN: javax.swing.JFormattedTextField: do_getSelectionStart_0
        !! FAIL: javax.swing.JFormattedTextField: do_getSelectionStart_0 status=fail with exception=java.lang.NullPointerException
      java.lang.NullPointerException
              at javax.swing.text.PlainView.getLineWidth(PlainView.java:615)
              at javax.swing.text.PlainView.updateDamage(PlainView.java:522)
              at javax.swing.text.PlainView.insertUpdate(PlainView.java:410)
              at javax.swing.text.FieldView.insertUpdate(FieldView.java:267)
              at javax.swing.plaf.basic.BasicTextUI$RootView.insertUpdate(BasicTextUI.java:1414)
              at javax.swing.plaf.basic.BasicTextUI$UpdateHandler.insertUpdate(BasicTextUI.java:1643)
              at javax.swing.text.AbstractDocument.fireInsertUpdate(AbstractDocument.java:185)
              at javax.swing.text.AbstractDocument.handleInsertString(AbstractDocument.java:736)
              at javax.swing.text.AbstractDocument.insertString(AbstractDocument.java:693)
              at javax.swing.text.PlainDocument.insertString(PlainDocument.java:117)
              at javax.swing.text.JTextComponent.setText(JTextComponent.java:1368)
              at javax.swing.JTextField.<init>(JTextField.java:227)
              at javax.swing.JTextField.<init>(JTextField.java:166)
              at javax_swing_JFormattedTextField.do_getSelectionStart_0(javax_swing_JFormattedTextField.java:19)
              at javax_swing_JFormattedTextField.run(javax_swing_JFormattedTextField.java:102)
              at java.lang.Thread.run(Thread.java:579)

      Testsuite available at
      /net/sqesvr/export/awt/awt_ws/Headless

      Attached is the failiures scenarios which throws NPE for this method and the complete Test Report


      How to run
      ===========

      1. Bringover Testsuite from /net/sqesvr/export/awt/awt_ws/Headless
      2. set STABLE_JAVA_HOME to /usr/local/java/jdk1.3/solaris.ri
      3. set JAVA_HOME to /usr/local/java/jdk1.4
      4. gnumake generate (have to run for the first time to generate files)
      5. gnumake compile
      6. gnumake run-headless

      Redirect the output to a file, since the Testsuite will not generate any reports on its own

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                prr Philip Race
                Reporter:
                rpullanisunw Rakesh Pullanikkad (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: