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

java.rmi.RemoteException spec: null reactions

XMLWordPrintable

    • Fix Understood
    • sparc
    • solaris_2.6



      Name: sdR10048 Date: 10/09/2003


      Filed By : SPB JCK team (###@###.###)
      JDK : java full version "1.5.0-beta-b22"

      Specification excerpt:
      ======================
      --------- J2SE API spec v.1.5 ---------
      ...
      public RemoteException()
      Constructs a RemoteException.

      public RemoteException(String s)
      Constructs a RemoteException with the specified detail message.
      Parameters:
      s - the detail message

      public RemoteException(String s,
                             Throwable cause)
      Constructs a RemoteException with the specified detail message and
      cause. This constructor sets the detail field to the specified Throwable.
      Parameters:
      s - the detail message
      cause - the cause

      public Throwable getCause()
      Returns the cause of this exception. This method returns
      the value of the detail field.
      Overrides:
      getCause in class Throwable
      Returns:
      the cause, which may be null.
      ...
      ---------- end-of-excerpt ---------------

      Problem description
      ===================
      The specification for the designated constructors does not specify all possible
      input param cases. In details:

      1) RemoteException()
          Not specified the value of message and cause properties.
          Spec for getCause() says "may be null" but it is ambiguous since that
          may refer to object state after RemoteException(String, NULL) calling.

      2) RemoteException(String s)
          Not specified the value of cause property.
          Also not specified the expected behaviour in case s == null.

      3) RemoteException(String s, Throwable cause)
          Not specified the expected behaviour in case s == null OR cause == null.
          Spec for getCause() says "may be null" but it is ambiguous since that
          may refer to object state after RemoteException() calling.

      Please see "Requirements for Writing Java API Specifications"
       (http://java.sun.com/j2se/javadoc/writingapispecs/index.html#method)

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

            Unassigned Unassigned
            dsvsunw Dsv Dsv (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: