8329718: Incorrect @since tags in elements in jdk.compiler and java.compiler

Reviewed-by: darcy, jjg
This commit is contained in:
Nizar Benalla 2024-05-22 19:13:21 +00:00 committed by Vicente Romero
parent b4d1454085
commit d59c12fe10
13 changed files with 36 additions and 11 deletions

@ -118,7 +118,7 @@ public class ElementKindVisitor14<R, P> extends ElementKindVisitor9<R, P> {
* @param p {@inheritDoc ElementKindVisitor6}
* @return the result of {@code defaultAction}
*
* @since 14
* @since 16
*/
@Override
public R visitVariableAsBindingVariable(VariableElement e, P p) {

@ -250,6 +250,8 @@ public class ElementScanner6<R, P> extends AbstractElementVisitor6<R, P> {
* @param e {@inheritDoc ElementVisitor}
* @param p {@inheritDoc ElementVisitor}
* @return the result of scanning
*
* @since 14
*/
@Override
public R visitRecordComponent(RecordComponentElement e, P p) {

@ -154,6 +154,8 @@ public class ForwardingJavaFileManager<M extends JavaFileManager> implements Jav
*
* @throws IllegalArgumentException {@inheritDoc}
* @throws IllegalStateException {@inheritDoc}
*
* @since 18
*/
@Override
public JavaFileObject getJavaFileForOutputForOriginatingFiles(Location location,
@ -214,6 +216,8 @@ public class ForwardingJavaFileManager<M extends JavaFileManager> implements Jav
*
* @throws IllegalArgumentException {@inheritDoc}
* @throws IllegalStateException {@inheritDoc}
*
* @since 18
*/
@Override
public FileObject getFileForOutputForOriginatingFiles(Location location,

@ -61,7 +61,8 @@ public interface CaseTree extends Tree {
* For default case, returns an empty list.
*
* @return labels for this case
* @since 12
*
* @since 14
*/
List<? extends ExpressionTree> getExpressions();
@ -98,7 +99,8 @@ public interface CaseTree extends Tree {
* {@linkplain CaseKind#STATEMENT}.
*
* @return case value or null
* @since 12
*
* @since 14
*/
public default Tree getBody() {
return null;
@ -108,7 +110,8 @@ public interface CaseTree extends Tree {
* Returns the kind of this case.
*
* @return the kind of this case
* @since 12
*
* @since 14
*/
public default CaseKind getCaseKind() {
return CaseKind.STATEMENT;
@ -121,7 +124,7 @@ public interface CaseTree extends Tree {
* <li>RULE: {@code case <expression> -> <expression>/<statement>}</li>
* </ul>
*
* @since 12
* @since 14
*/
public enum CaseKind {
/**

@ -39,7 +39,7 @@ import java.util.List;
*
* @jls 15.29 Switch Expressions
*
* @since 12
* @since 14
*/
public interface SwitchExpressionTree extends ExpressionTree {
/**

@ -284,7 +284,7 @@ public interface Tree {
/**
* Used for instances of {@link SwitchExpressionTree}.
*
* @since 12
* @since 14
*/
SWITCH_EXPRESSION(SwitchExpressionTree.class),
@ -702,7 +702,7 @@ public interface Tree {
/**
* Used for instances of {@link YieldTree}.
*
* @since 13
* @since 14
*/
YIELD(YieldTree.class);

@ -413,7 +413,8 @@ public interface TreeVisitor<R,P> {
* @param node the node being visited
* @param p a parameter value
* @return a result value
* @since 12
*
* @since 14
*/
R visitSwitchExpression(SwitchExpressionTree node, P p);
@ -608,7 +609,8 @@ public interface TreeVisitor<R,P> {
* @param node the node being visited
* @param p a parameter value
* @return a result value
* @since 13
*
* @since 14
*/
R visitYield(YieldTree node, P p);
}

@ -35,7 +35,7 @@ package com.sun.source.tree;
*
* @jls 14.21 The yield Statement
*
* @since 13
* @since 14
*/
public interface YieldTree extends StatementTree {

@ -229,6 +229,8 @@ public class DocTreeScanner<R,P> implements DocTreeVisitor<R,P> {
* @param node {@inheritDoc}
* @param p {@inheritDoc}
* @return the result of scanning
*
* @since 10
*/
@Override
public R visitDocType(DocTypeTree node, P p) {

@ -276,6 +276,8 @@ public abstract class DocTrees extends Trees {
* @param tree the tree containing the entity
* @return a string containing the characters
* @spec https://www.w3.org/TR/html52 HTML Standard
*
* @since 16
*/
public abstract String getCharacters(EntityTree tree);
}

@ -74,6 +74,8 @@ public interface Plugin {
* command-line option.
*
* @return whether or not this plugin should be automatically started
*
* @since 14
*/
default boolean autoStart() {
return false;

@ -299,6 +299,8 @@ public class SimpleTreeVisitor <R,P> implements TreeVisitor<R,P> {
* @param node {@inheritDoc}
* @param p {@inheritDoc}
* @return the result of {@code defaultAction}
*
* @since 14
*/
@Override
public R visitSwitchExpression(SwitchExpressionTree node, P p) {
@ -1047,6 +1049,8 @@ public class SimpleTreeVisitor <R,P> implements TreeVisitor<R,P> {
* @param node {@inheritDoc}
* @param p {@inheritDoc}
* @return the result of {@code defaultAction}
*
* @since 14
*/
@Override
public R visitYield(YieldTree node, P p) {

@ -376,6 +376,8 @@ public class TreeScanner<R,P> implements TreeVisitor<R,P> {
* @param node {@inheritDoc}
* @param p {@inheritDoc}
* @return the result of scanning
*
* @since 14
*/
@Override
public R visitSwitchExpression(SwitchExpressionTree node, P p) {
@ -1200,6 +1202,8 @@ public class TreeScanner<R,P> implements TreeVisitor<R,P> {
* @param node {@inheritDoc}
* @param p {@inheritDoc}
* @return the result of scanning
*
* @since 14
*/
@Override
public R visitYield(YieldTree node, P p) {