JDK-4491682 : java.beans.Encoder methods are missing null parameter spec
  • Type: Bug
  • Component: docs
  • Sub-Component: guides
  • Affected Version: 1.4.0,5.0
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic,solaris_2.6
  • CPU: generic,sparc
  • Submitted: 2001-08-14
  • Updated: 2004-09-16
  • Resolved: 2003-11-11
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
5.0 b28Fixed
Related Reports
Duplicate :  
Duplicate :  
Relates :  
Description
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.

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

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: generic tiger-beta FIXED IN: tiger tiger-beta INTEGRATED IN: tiger-b28 tiger-beta VERIFIED IN: 1.5
17-09-2004

EVALUATION Documenting at the package level: "Unless explicitly stated, null values or empty Strings are not valid parameters for the methods in this package. You may expect to see exceptions if these parameters are used." ###@###.### 2003-09-08
08-09-2003