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

Add explicit constructors to MalformedParameterizedTypeException

    XMLWordPrintable

    Details

    • Type: CSR
    • Status: Closed
    • Priority: P4
    • Resolution: Approved
    • Fix Version/s: 10
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Compatibility Risk:
      minimal
    • Interface Kind:
      Java API
    • Scope:
      SE

      Description

      Summary

      The type java.lang.reflect.MalformedParameterizedTypeException does not include any explicitly declared constructors. At least some of the usual set of exception constructors should be added.

      Problem

      Not having any explicitly declared constructors is a poor practice for a public type.

      Solution

      Add a no-arg and String constructor.

      Specification

      @@ -36,4 +36,21 @@
        */
       public class MalformedParameterizedTypeException extends RuntimeException {
           private static final long serialVersionUID = -5696557788586220964L;
      +
      +    /**
      +     * Constructs a {@code MalformedParameterizedTypeException} with
      +     * no detail message.
      +     */
      +    public MalformedParameterizedTypeException() {
      +        super();
      +    }
      +
      +    /**
      +     * Constructs a {@code MalformedParameterizedTypeException} with
      +     * the given detail message.
      +     * @param message the detail message; may be {@code null}
      +     */
      +    public MalformedParameterizedTypeException(String message) {
      +        super(message);
      +    }

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              darcy Joe Darcy
              Reporter:
              darcy Joe Darcy
              Reviewed By:
              Brian Burkhalter
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: