Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public R visitTypeAsRecord(TypeElement e, P p) {
* @param p {@inheritDoc ElementKindVisitor6}
* @return the result of {@code defaultAction}
*
* @since 14
* @since 16
*/
@Override
public R visitVariableAsBindingVariable(VariableElement e, P p) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,8 @@ public R visitTypeParameter(TypeParameterElement e, P p) {
* @param e {@inheritDoc ElementVisitor}
* @param p {@inheritDoc ElementVisitor}
* @return the result of scanning
*
* @since 14
*/
@Override
public R visitRecordComponent(RecordComponentElement e, P p) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ public JavaFileObject getJavaFileForOutput(Location location,
*
* @throws IllegalArgumentException {@inheritDoc}
* @throws IllegalStateException {@inheritDoc}
*
* @since 18
*/
@Override
public JavaFileObject getJavaFileForOutputForOriginatingFiles(Location location,
Expand Down Expand Up @@ -214,6 +216,8 @@ public FileObject getFileForOutput(Location location,
*
* @throws IllegalArgumentException {@inheritDoc}
* @throws IllegalStateException {@inheritDoc}
*
* @since 18
*/
@Override
public FileObject getFileForOutputForOriginatingFiles(Location location,
Expand Down
11 changes: 7 additions & 4 deletions src/jdk.compiler/share/classes/com/sun/source/tree/CaseTree.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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;
Expand All @@ -108,7 +110,8 @@ public default Tree getBody() {
* Returns the kind of this case.
*
* @return the kind of this case
* @since 12
*
* @since 14
*/
public default CaseKind getCaseKind() {
return CaseKind.STATEMENT;
Expand All @@ -121,7 +124,7 @@ public default CaseKind getCaseKind() {
* <li>RULE: {@code case <expression> -> <expression>/<statement>}</li>
* </ul>
*
* @since 12
* @since 14
*/
public enum CaseKind {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
*
* @jls 15.29 Switch Expressions
*
* @since 12
* @since 14
*/
public interface SwitchExpressionTree extends ExpressionTree {
/**
Expand Down
4 changes: 2 additions & 2 deletions src/jdk.compiler/share/classes/com/sun/source/tree/Tree.java
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ public enum Kind {
/**
* Used for instances of {@link SwitchExpressionTree}.
*
* @since 12
* @since 14
*/
SWITCH_EXPRESSION(SwitchExpressionTree.class),

Expand Down Expand Up @@ -702,7 +702,7 @@ public enum Kind {
/**
* Used for instances of {@link YieldTree}.
*
* @since 13
* @since 14
*/
YIELD(YieldTree.class);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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);
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
*
* @jls 14.21 The yield Statement
*
* @since 13
* @since 14
*/
public interface YieldTree extends StatementTree {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,8 @@ public R visitDocRoot(DocRootTree node, P p) {
* @param node {@inheritDoc}
* @param p {@inheritDoc}
* @return the result of scanning
*
* @since 10
*/
@Override
public R visitDocType(DocTypeTree node, P p) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,8 @@ public abstract void printMessage(Diagnostic.Kind kind, CharSequence msg,
* @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);
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,8 @@ public R visitSwitch(SwitchTree node, P p) {
* @param node {@inheritDoc}
* @param p {@inheritDoc}
* @return the result of {@code defaultAction}
*
* @since 14
*/
@Override
public R visitSwitchExpression(SwitchExpressionTree node, P p) {
Expand Down Expand Up @@ -1047,6 +1049,8 @@ public R visitOther(Tree node, P p) {
* @param node {@inheritDoc}
* @param p {@inheritDoc}
* @return the result of {@code defaultAction}
*
* @since 14
*/
@Override
public R visitYield(YieldTree node, P p) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,8 @@ public R visitSwitch(SwitchTree node, P p) {
* @param node {@inheritDoc}
* @param p {@inheritDoc}
* @return the result of scanning
*
* @since 14
*/
@Override
public R visitSwitchExpression(SwitchExpressionTree node, P p) {
Expand Down Expand Up @@ -1200,6 +1202,8 @@ public R visitErroneous(ErroneousTree node, P p) {
* @param node {@inheritDoc}
* @param p {@inheritDoc}
* @return the result of scanning
*
* @since 14
*/
@Override
public R visitYield(YieldTree node, P p) {
Expand Down