src/share/classes/javax/lang/model/type/MirroredTypeException.java

Print this page

        

@@ -40,11 +40,11 @@
  * @author Peter von der Ahé
  * @see MirroredTypesException
  * @see Element#getAnnotation(Class)
  * @since 1.6
  */
-public class MirroredTypeException extends RuntimeException {
+public class MirroredTypeException extends MirroredTypesException {
 
     private static final long serialVersionUID = 269;
 
     private transient TypeMirror type;          // cannot be serialized
 

@@ -52,11 +52,11 @@
      * Constructs a new MirroredTypeException for the specified type.
      *
      * @param type  the type being accessed
      */
     public MirroredTypeException(TypeMirror type) {
-        super("Attempt to access Class object for TypeMirror " + type.toString());
+        super("Attempt to access Class object for TypeMirror " + type.toString(), type);
         this.type = type;
     }
 
     /**
      * Returns the type mirror corresponding to the type being accessed.

@@ -74,7 +74,8 @@
      */
     private void readObject(ObjectInputStream s)
         throws IOException, ClassNotFoundException {
         s.defaultReadObject();
         type = null;
+        types = null;
     }
 }