Mercurial > hg > shenandoah-preopenjdk-archive > openjdk8 > langtools
changeset 2222:6d1f9d1fd585
8030080: Correct misstatement in JSR 269 MR (in javax.lang.model)
Reviewed-by: jfranck
author | darcy |
---|---|
date | Tue, 17 Dec 2013 10:26:10 -0800 |
parents | 8832b6048e65 |
children | f1be939b49f6 |
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 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 <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 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. * - * <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