JDK-4432051 : JDI spec: methods which throw NullPointerException on null param not documented
  • Type: Bug
  • Component: core-svc
  • Sub-Component: debugger
  • Affected Version: 1.3.1,1.4.0
  • Priority: P5
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic,solaris_7
  • CPU: generic,sparc
  • Submitted: 2001-03-30
  • Updated: 2001-05-17
  • Resolved: 2001-05-17
Related Reports
Duplicate :  
Duplicate :  
Duplicate :  
Description
When passed null instead of a Object value many JDI methods will throw
NullPointerException.  The spec does not declare these NullPointerExceptions.

A few of many such cases:

          StackFrame.getValue(LocalVariable variable)
          StackFrame.getValues(java.util.List variables)

          Argument.isValid(null)
          BooleanArgument.isValid(null)
          StringArgument.isValid(null)



Name: elR10090			Date: 04/28/2001


This bug causes failure of the following testbase_nsk tests:

    nsk/jdi/Argument/isValid/isvalid002 
    nsk/jdi/Argument/setValue/setvalue001
    nsk/jdi/BooleanArgument/isValid/isvalid002 

Such record containing full test names allows to automatically 
generate the following list of known test failures (we maintain 
it updated every working day): 

    /net/sqesvr.eng/export/vsn/VM/testbase/nsk_stuff/buglist_nsk/nsk.knownbugs

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

Comments
PUBLIC COMMENTS When passed null instead of a Object value many JDI methods will throw NullPointerException. The spec does not declare these NullPointerExceptions.
10-06-2004

EVALUATION There is controversy as to whether it is good to add these or whether it just makes specs harder to read. In the J2SE SDK, java.lang.Integer documents them java.util.ArrayList and its interface List do not From personal communication with author this was intentional. Note that VMDisconnectedException is not documented as it can be thrown from virtually every method. robert.field@Eng 2001-03-29 4460188 is now the uber bug for exception specification. Closed as a duplicate of 4460188. robert.field@Eng 2001-05-17
29-03-2001