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

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright 2005-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2005-2009 Sun Microsystems, Inc.  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
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Sun designates this

@@ -23,11 +23,12 @@
  * have any questions.
  */
 
 package javax.lang.model.type;
 
-
+import java.io.ObjectInputStream;
+import java.io.IOException;
 import java.lang.annotation.Annotation;
 import javax.lang.model.element.Element;
 
 
 /**

@@ -65,6 +66,15 @@
      * @return the type mirror, or {@code null} if unavailable
      */
     public TypeMirror getTypeMirror() {
         return type;
     }
+
+    /**
+     * Explicitly set all transient fields.
+     */
+    private void readObject(ObjectInputStream s)
+        throws IOException, ClassNotFoundException {
+        s.defaultReadObject();
+        type = null;
+    }
 }