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

(spec) IOError constructor specification contains unclear assertion

XMLWordPrintable

    • b85
    • generic
    • generic

      Specification is:
      -----------------
      public IOError(Throwable cause)

          Constructs a new instance of this error, with the specified cause.

          If the cause is not null then the detail string of the new error will be that of the given cause.
      -----------------
      Questions are:
      1) "the detail string" - is it "the detail message" which method getMessage() returns? If yes, it would be nice to formulate it more clear.
      2) It is possible to understand such spec by the following way:
             IOError newError = new IOError(cause);
             if (cause != null) then newError.getMessage().equals(cause.getMessage());
       But it is wrong.

            sherman Xueming Shen
            ynovozhi Yulia Novozhilova (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: