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

JFormattedTextField.getPropertyChangeListeners() throws NPE

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      beta
    • CPU:
      sparc
    • OS:
      solaris_2.6
    • Verification:
      Verified

      Description



      Name: ooR10001 Date: 02/01/2001


      javax.swing.JFormattedTextField.getPropertyChangeListeners() method throws
      NullPointerException.

      Following test demonstrates this bug:
      ----------------------------
      import javax.swing.JFormattedTextField;

      public class test {

          public static void main(String[] args) {
              JFormattedTextField jftf =
                      new JFormattedTextField(new java.text.SimpleDateFormat());
              java.beans.PropertyChangeListener[] pcls =
                      jftf.getPropertyChangeListeners();
          }

      }
      ----------------------------

      Test's output:
      ------------------------
      Exception in thread "main" java.lang.NullPointerException
              at java.awt.Component.getPropertyChangeListeners(Component.java:6286)
              at test.main(test.java:8)
      ------------------------

      It needs to be fixed.

      ======================================================================

        Attachments

          Activity

            People

            Assignee:
            bchristi Brent Christian
            Reporter:
            oovsunw Oov Oov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: