JDK 10 RFR of JDK-8183175: Add explicit constructors to MalformedParameterizedTypeException

joe darcy joe.darcy at oracle.com
Thu Jun 29 00:01:48 UTC 2017


Hello,

As noted in

     JDK-8183175: Add explicit constructors to 
MalformedParameterizedTypeException

the exception type java.lang.reflect.MalformedParameterizedTypeException 
does not include any explicit constructors. A no-arg constructor and a 
string constructor should be added in the usual way.

Please review the patch below which adds the constructors in question.

Please also review the corresponding CSR issue:

     https://bugs.openjdk.java.net/browse/JDK-8183177

Thanks,

-Joe

diff -r c150ee32ec89 
src/java.base/share/classes/java/lang/reflect/MalformedParameterizedTypeException.java
--- 
a/src/java.base/share/classes/java/lang/reflect/MalformedParameterizedTypeException.java 
Wed Jun 28 11:27:29 2017 -0700
+++ 
b/src/java.base/share/classes/java/lang/reflect/MalformedParameterizedTypeException.java 
Wed Jun 28 16:57:13 2017 -0700
@@ -1,5 +1,5 @@
  /*
- * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights 
reserved.
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights 
reserved.
   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   *
   * This code is free software; you can redistribute it and/or modify it
@@ -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);
+    }
  }



More information about the core-libs-dev mailing list