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

java.beans.Encoder methods are missing null parameter spec

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 5.0
    • 1.4.0, 5.0
    • docs
    • b28
    • generic, sparc
    • generic, solaris_2.6
    • Verified

      Name: acR10002 Date: 08/14/2001



      The following methods in class beans.Encoder take a reference type of input.
      However, noone of these methods have the documented behavior for a case when
      null is passed in:

       PersistenceDelegate getPersistenceDelegate(Class type)
       Object remove(Object oldInstance)
       void setExceptionListener(ExceptionListener exceptionListener)
       void setPersistenceDelegate(Class type, PersistenceDelegate persistenceDelegate)
       void writeExpression(Expression oldExp)
       protected void writeObject(Object o)
       void writeStatement(Statement oldStm)

      The existing specification for beans.Encoder doesn't comply the
      "Requirements for Writing Java API Specifications" listed at
      http://java.sun.com/j2se/javadoc/writingapispecs/index.html#method. In
      particular, there is a requirement for a method specification:
      -------------------------
      Method Specification
          This section applies to Java methods and constructors. Each method and
          constructor specification must include:
          .....
      4.Null Argument Values - For each reference type argument, specify the behavior
        when null is passed in.See two examples. NOTE: If possible, document the general
        null argument behavior at the package or class level, such as causing a
        java.lang.NullPointerException to be thrown. Deviations from this behavior can
        then be documented at the method level.
      ------------------------
      Please document null-parameter behavior for all of the listed above
      methods, or put an appropriate single generic note into the class
      description.

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

            shommel Scott Hommel (Inactive)
            aycsunw Ayc Ayc (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: