JDK 9 RFR of JDK-8051482: Fix deprecation warnings in javax.lang.model.util
Joe Darcy
joe.darcy at oracle.com
Mon Jul 21 19:25:36 UTC 2014
Hello,
Please review the fix below for
JDK-8051482: Fix deprecation warnings in javax.lang.model.util
In brief, when the 9-era visitors were recently added under 8050430:
Provided new utility visitors supporting SourceVersion.RELEASE_9, the
6-era visitors were deprecated. This caused the 7-era visitors which
extend the 6-era visitors to suffer spurious deprecation warnings when
compiled. (The langtools build uses -Xlint:all so I thought any new
deprecation warnings would be caught there, but IIRC javax.lang.model.*
is compiled as part of the core libs as it ends up on rt.jar.)
Thanks,
-Joe
diff -r bfed975590b9
src/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor7.java
---
a/src/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor7.java
Thu Jul 17 16:46:29 2014 -0700
+++
b/src/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor7.java
Mon Jul 21 12:22:47 2014 -0700
@@ -68,6 +68,7 @@
* @see AbstractAnnotationValueVisitor9
* @since 1.7
*/
+ at SuppressWarnings("deprecation") // Superclass deprecated
@SupportedSourceVersion(RELEASE_7)
public abstract class AbstractAnnotationValueVisitor7<R, P> extends
AbstractAnnotationValueVisitor6<R, P> {
diff -r bfed975590b9
src/share/classes/javax/lang/model/util/AbstractElementVisitor7.java
---
a/src/share/classes/javax/lang/model/util/AbstractElementVisitor7.java
Thu Jul 17 16:46:29 2014 -0700
+++
b/src/share/classes/javax/lang/model/util/AbstractElementVisitor7.java
Mon Jul 21 12:22:47 2014 -0700
@@ -72,6 +72,7 @@
* @see AbstractElementVisitor9
* @since 1.7
*/
+ at SuppressWarnings("deprecation") // Superclass deprecated
@SupportedSourceVersion(RELEASE_7)
public abstract class AbstractElementVisitor7<R, P> extends
AbstractElementVisitor6<R, P> {
/**
diff -r bfed975590b9
src/share/classes/javax/lang/model/util/AbstractTypeVisitor7.java
--- a/src/share/classes/javax/lang/model/util/AbstractTypeVisitor7.java
Thu Jul 17 16:46:29 2014 -0700
+++ b/src/share/classes/javax/lang/model/util/AbstractTypeVisitor7.java
Mon Jul 21 12:22:47 2014 -0700
@@ -72,6 +72,7 @@
* @see AbstractTypeVisitor9
* @since 1.7
*/
+ at SuppressWarnings("deprecation") // Superclass deprecated
@SupportedSourceVersion(RELEASE_7)
public abstract class AbstractTypeVisitor7<R, P> extends
AbstractTypeVisitor6<R, P> {
/**
diff -r bfed975590b9
src/share/classes/javax/lang/model/util/ElementKindVisitor7.java
--- a/src/share/classes/javax/lang/model/util/ElementKindVisitor7.java
Thu Jul 17 16:46:29 2014 -0700
+++ b/src/share/classes/javax/lang/model/util/ElementKindVisitor7.java
Mon Jul 21 12:22:47 2014 -0700
@@ -85,6 +85,7 @@
* @see ElementKindVisitor9
* @since 1.7
*/
+ at SuppressWarnings("deprecation") // Superclass deprecated
@SupportedSourceVersion(RELEASE_7)
public class ElementKindVisitor7<R, P> extends ElementKindVisitor6<R, P> {
/**
diff -r bfed975590b9
src/share/classes/javax/lang/model/util/ElementScanner7.java
--- a/src/share/classes/javax/lang/model/util/ElementScanner7.java Thu
Jul 17 16:46:29 2014 -0700
+++ b/src/share/classes/javax/lang/model/util/ElementScanner7.java Mon
Jul 21 12:22:47 2014 -0700
@@ -89,6 +89,7 @@
* @see ElementScanner9
* @since 1.7
*/
+ at SuppressWarnings("deprecation") // Superclass deprecated
@SupportedSourceVersion(RELEASE_7)
public class ElementScanner7<R, P> extends ElementScanner6<R, P> {
/**
diff -r bfed975590b9
src/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor7.java
---
a/src/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor7.java
Thu Jul 17 16:46:29 2014 -0700
+++
b/src/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor7.java
Mon Jul 21 12:22:47 2014 -0700
@@ -75,6 +75,7 @@
* @see SimpleAnnotationValueVisitor9
* @since 1.7
*/
+ at SuppressWarnings("deprecation") // Superclass deprecated
@SupportedSourceVersion(RELEASE_7)
public class SimpleAnnotationValueVisitor7<R, P> extends
SimpleAnnotationValueVisitor6<R, P> {
/**
diff -r bfed975590b9
src/share/classes/javax/lang/model/util/SimpleElementVisitor7.java
--- a/src/share/classes/javax/lang/model/util/SimpleElementVisitor7.java
Thu Jul 17 16:46:29 2014 -0700
+++ b/src/share/classes/javax/lang/model/util/SimpleElementVisitor7.java
Mon Jul 21 12:22:47 2014 -0700
@@ -81,6 +81,7 @@
* @see SimpleElementVisitor9
* @since 1.7
*/
+ at SuppressWarnings("deprecation") // Superclass deprecated
@SupportedSourceVersion(RELEASE_7)
public class SimpleElementVisitor7<R, P> extends
SimpleElementVisitor6<R, P> {
/**
diff -r bfed975590b9
src/share/classes/javax/lang/model/util/SimpleTypeVisitor7.java
--- a/src/share/classes/javax/lang/model/util/SimpleTypeVisitor7.java
Thu Jul 17 16:46:29 2014 -0700
+++ b/src/share/classes/javax/lang/model/util/SimpleTypeVisitor7.java
Mon Jul 21 12:22:47 2014 -0700
@@ -81,6 +81,7 @@
* @see SimpleTypeVisitor9
* @since 1.7
*/
+ at SuppressWarnings("deprecation") // Superclass deprecated
@SupportedSourceVersion(RELEASE_7)
public class SimpleTypeVisitor7<R, P> extends SimpleTypeVisitor6<R, P> {
/**
diff -r bfed975590b9
src/share/classes/javax/lang/model/util/TypeKindVisitor7.java
--- a/src/share/classes/javax/lang/model/util/TypeKindVisitor7.java Thu
Jul 17 16:46:29 2014 -0700
+++ b/src/share/classes/javax/lang/model/util/TypeKindVisitor7.java Mon
Jul 21 12:22:47 2014 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights
reserved.
+ * Copyright (c) 2010, 2014, Oracle and/or its affiliates. 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
@@ -82,6 +82,7 @@
* @see TypeKindVisitor8
* @since 1.7
*/
+ at SuppressWarnings("deprecation") // Superclass deprecated
@SupportedSourceVersion(RELEASE_7)
public class TypeKindVisitor7<R, P> extends TypeKindVisitor6<R, P> {
/**
More information about the compiler-dev
mailing list