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

TextField throws NPE

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 9
    • 9
    • client-libs
    • 9
    • b100
    • generic
    • generic

      regression : This issue is regression of 8055197 fix
       http://hg.openjdk.java.net/jdk9/client/jdk/rev/a78263581ce6

      TextField constructor & setText throws Null pointer exception.

      Below lines of code will throw the NPE,
      TextField text = new TextField (null);
      text.setText(null);

      Exception:
      Exception in thread "main" java.lang.NullPointerException
      at java.awt.TextField.replaceEOL(TextField.java:314)
      at java.awt.TextField.<init>(TextField.java:201)
      at java.awt.TextField.<init>(TextField.java:167)

            arapte Ambarish Rapte
            arapte Ambarish Rapte
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: