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

java.beans.Statement.toString throw unexpected NullPointerException

    XMLWordPrintable

    Details

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

      Description



      Name: dsR10051 Date: 12/20/2000



      The method java.beans.Statement.toString() throw unexpected NullPointerException
      when the arguments array of statement is null.

      Here is a minimized test:
      import java.beans.Statement;

      public class StatementTest01 {

          public static void main(String[] args) {

              Object target = new Object();
              String methodName = "equals";
              Object[] arguments = null;

              Statement st = new Statement(target, methodName, arguments);

              System.out.println(st.toString());

          }
      }
      --- Output ---
      %java -version
      java version "1.4.0beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0beta-b40)
      Java HotSpot(TM) Client VM (build 1.4beta-B40, mixed mode)
      %java StatementTest01
      Exception in thread "main" java.lang.NullPointerException
              at java.beans.Statement.toString(Statement.java:282)
              at StatementTest01.main(StatementTest01.java:13)

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

        Attachments

          Activity

            People

            Assignee:
            pmilnesunw Philip Milne (Inactive)
            Reporter:
            sdasunw Sda Sda (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: