JDK-8183177 : Add explicit constructors to MalformedParameterizedTypeException
  • Type: CSR
  • Component: core-libs
  • Sub-Component: java.lang:reflect
  • Priority: P4
  • Status: Closed
  • Resolution: Approved
  • Fix Versions: 10
  • Submitted: 2017-06-28
  • Updated: 2017-09-25
  • Resolved: 2017-06-29
Related Reports
CSR :  
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);
    +    }


Comments
Moving to Approved.
29-06-2017