# HG changeset patch # User darcy # Date 1387304770 28800 # Node ID 6d1f9d1fd585e885e5e4e2f64462dcd6af34836e # Parent 8832b6048e65727334be777172ff2b3099c45782 8030080: Correct misstatement in JSR 269 MR (in javax.lang.model) Reviewed-by: jfranck diff -r 8832b6048e65 -r 6d1f9d1fd585 src/share/classes/javax/lang/model/type/IntersectionType.java --- a/src/share/classes/javax/lang/model/type/IntersectionType.java Fri Dec 13 14:13:03 2013 +0000 +++ b/src/share/classes/javax/lang/model/type/IntersectionType.java Tue Dec 17 10:26:10 2013 -0800 @@ -35,10 +35,12 @@ * {@code } 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 */ diff -r 8832b6048e65 -r 6d1f9d1fd585 src/share/classes/javax/lang/model/util/Types.java --- a/src/share/classes/javax/lang/model/util/Types.java Fri Dec 13 14:13:03 2013 +0000 +++ b/src/share/classes/javax/lang/model/util/Types.java Tue Dec 17 10:26:10 2013 -0800 @@ -60,13 +60,6 @@ /** * Tests whether two {@code TypeMirror} objects represent the same type. * - *

Since annotations are only meta-data associated with a type, - * the set of annotations on either argument is not 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. - * *

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));} * * + *

Since annotations are only meta-data associated with a type, + * the set of annotations on either argument is not 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