changeset 3123:744e0f74f7a0

8030080: Correct misstatement in JSR 269 MR (in javax.lang.model) Reviewed-by: jfranck
author darcy
date Tue, 17 Dec 2013 10:28:36 -0800
parents 378aa10645e1
children 9493a72cf1f5
files src/share/classes/javax/lang/model/type/IntersectionType.java src/share/classes/javax/lang/model/util/Types.java
diffstat 2 files changed, 13 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/javax/lang/model/type/IntersectionType.java	Tue Dec 17 10:58:26 2013 +0100
+++ b/src/share/classes/javax/lang/model/type/IntersectionType.java	Tue Dec 17 10:28:36 2013 -0800
@@ -35,10 +35,12 @@
  * {@code <T extends Number & Runnable>} is an (implicit) intersection
  * type.  As of {@link javax.lang.model.SourceVersion#RELEASE_8
  * RELEASE_8}, this is represented by an {@code IntersectionType} with
- * {@code Number} and {@code Runnable} as its bounds.  Also as of the
- * {@link javax.lang.model.SourceVersion#RELEASE_8 RELEASE_8},
- * intersection types can explicitly appear as the target type of a
- * cast expression.
+ * {@code Number} and {@code Runnable} as its bounds.
+ *
+ * @implNote Also as of {@link
+ * javax.lang.model.SourceVersion#RELEASE_8 RELEASE_8}, in the
+ * reference implementation an {@code IntersectionType} is used to
+ * model the explicit target type of a cast expression.
  *
  * @since 1.8
  */
--- a/src/share/classes/javax/lang/model/util/Types.java	Tue Dec 17 10:58:26 2013 +0100
+++ b/src/share/classes/javax/lang/model/util/Types.java	Tue Dec 17 10:28:36 2013 -0800
@@ -60,13 +60,6 @@
     /**
      * Tests whether two {@code TypeMirror} objects represent the same type.
      *
-     * <p>Since annotations are only meta-data associated with a type,
-     * the set of annotations on either argument is <em>not</em> taken
-     * into account when computing whether or not two {@code
-     * TypeMirror} objects are the same type. In particular, two
-     * {@code TypeMirror} objects can have different annotations and
-     * still be considered the same.
-     *
      * <p>Caveat: if either of the arguments to this method represents a
      * wildcard, this method will return false.  As a consequence, a wildcard
      * is not the same type as itself.  This might be surprising at first,
@@ -77,6 +70,13 @@
      *   {@code list.add(list.get(0));}
      * </pre>
      *
+     * <p>Since annotations are only meta-data associated with a type,
+     * the set of annotations on either argument is <em>not</em> taken
+     * into account when computing whether or not two {@code
+     * TypeMirror} objects are the same type. In particular, two
+     * {@code TypeMirror} objects can have different annotations and
+     * still be considered the same.
+     *
      * @param t1  the first type
      * @param t2  the second type
      * @return {@code true} if and only if the two types are the same