Skip to content

Commit d59c12f

Browse files
nizarbenallaVicente Romero
authored and
Vicente Romero
committed
8329718: Incorrect @since tags in elements in jdk.compiler and java.compiler
Reviewed-by: darcy, jjg
1 parent b4d1454 commit d59c12f

File tree

13 files changed

+36
-11
lines changed

13 files changed

+36
-11
lines changed

src/java.compiler/share/classes/javax/lang/model/util/ElementKindVisitor14.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public R visitTypeAsRecord(TypeElement e, P p) {
118118
* @param p {@inheritDoc ElementKindVisitor6}
119119
* @return the result of {@code defaultAction}
120120
*
121-
* @since 14
121+
* @since 16
122122
*/
123123
@Override
124124
public R visitVariableAsBindingVariable(VariableElement e, P p) {

src/java.compiler/share/classes/javax/lang/model/util/ElementScanner6.java

+2
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,8 @@ public R visitTypeParameter(TypeParameterElement e, P p) {
250250
* @param e {@inheritDoc ElementVisitor}
251251
* @param p {@inheritDoc ElementVisitor}
252252
* @return the result of scanning
253+
*
254+
* @since 14
253255
*/
254256
@Override
255257
public R visitRecordComponent(RecordComponentElement e, P p) {

src/java.compiler/share/classes/javax/tools/ForwardingJavaFileManager.java

+4
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,8 @@ public JavaFileObject getJavaFileForOutput(Location location,
154154
*
155155
* @throws IllegalArgumentException {@inheritDoc}
156156
* @throws IllegalStateException {@inheritDoc}
157+
*
158+
* @since 18
157159
*/
158160
@Override
159161
public JavaFileObject getJavaFileForOutputForOriginatingFiles(Location location,
@@ -214,6 +216,8 @@ public FileObject getFileForOutput(Location location,
214216
*
215217
* @throws IllegalArgumentException {@inheritDoc}
216218
* @throws IllegalStateException {@inheritDoc}
219+
*
220+
* @since 18
217221
*/
218222
@Override
219223
public FileObject getFileForOutputForOriginatingFiles(Location location,

src/jdk.compiler/share/classes/com/sun/source/tree/CaseTree.java

+7-4
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ public interface CaseTree extends Tree {
6161
* For default case, returns an empty list.
6262
*
6363
* @return labels for this case
64-
* @since 12
64+
*
65+
* @since 14
6566
*/
6667
List<? extends ExpressionTree> getExpressions();
6768

@@ -98,7 +99,8 @@ public interface CaseTree extends Tree {
9899
* {@linkplain CaseKind#STATEMENT}.
99100
*
100101
* @return case value or null
101-
* @since 12
102+
*
103+
* @since 14
102104
*/
103105
public default Tree getBody() {
104106
return null;
@@ -108,7 +110,8 @@ public default Tree getBody() {
108110
* Returns the kind of this case.
109111
*
110112
* @return the kind of this case
111-
* @since 12
113+
*
114+
* @since 14
112115
*/
113116
public default CaseKind getCaseKind() {
114117
return CaseKind.STATEMENT;
@@ -121,7 +124,7 @@ public default CaseKind getCaseKind() {
121124
* <li>RULE: {@code case <expression> -> <expression>/<statement>}</li>
122125
* </ul>
123126
*
124-
* @since 12
127+
* @since 14
125128
*/
126129
public enum CaseKind {
127130
/**

src/jdk.compiler/share/classes/com/sun/source/tree/SwitchExpressionTree.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
*
4040
* @jls 15.29 Switch Expressions
4141
*
42-
* @since 12
42+
* @since 14
4343
*/
4444
public interface SwitchExpressionTree extends ExpressionTree {
4545
/**

src/jdk.compiler/share/classes/com/sun/source/tree/Tree.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ public enum Kind {
284284
/**
285285
* Used for instances of {@link SwitchExpressionTree}.
286286
*
287-
* @since 12
287+
* @since 14
288288
*/
289289
SWITCH_EXPRESSION(SwitchExpressionTree.class),
290290

@@ -702,7 +702,7 @@ public enum Kind {
702702
/**
703703
* Used for instances of {@link YieldTree}.
704704
*
705-
* @since 13
705+
* @since 14
706706
*/
707707
YIELD(YieldTree.class);
708708

src/jdk.compiler/share/classes/com/sun/source/tree/TreeVisitor.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,8 @@ public interface TreeVisitor<R,P> {
413413
* @param node the node being visited
414414
* @param p a parameter value
415415
* @return a result value
416-
* @since 12
416+
*
417+
* @since 14
417418
*/
418419
R visitSwitchExpression(SwitchExpressionTree node, P p);
419420

@@ -608,7 +609,8 @@ public interface TreeVisitor<R,P> {
608609
* @param node the node being visited
609610
* @param p a parameter value
610611
* @return a result value
611-
* @since 13
612+
*
613+
* @since 14
612614
*/
613615
R visitYield(YieldTree node, P p);
614616
}

src/jdk.compiler/share/classes/com/sun/source/tree/YieldTree.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
*
3636
* @jls 14.21 The yield Statement
3737
*
38-
* @since 13
38+
* @since 14
3939
*/
4040
public interface YieldTree extends StatementTree {
4141

src/jdk.compiler/share/classes/com/sun/source/util/DocTreeScanner.java

+2
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,8 @@ public R visitDocRoot(DocRootTree node, P p) {
229229
* @param node {@inheritDoc}
230230
* @param p {@inheritDoc}
231231
* @return the result of scanning
232+
*
233+
* @since 10
232234
*/
233235
@Override
234236
public R visitDocType(DocTypeTree node, P p) {

src/jdk.compiler/share/classes/com/sun/source/util/DocTrees.java

+2
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,8 @@ public abstract void printMessage(Diagnostic.Kind kind, CharSequence msg,
276276
* @param tree the tree containing the entity
277277
* @return a string containing the characters
278278
* @spec https://www.w3.org/TR/html52 HTML Standard
279+
*
280+
* @since 16
279281
*/
280282
public abstract String getCharacters(EntityTree tree);
281283
}

src/jdk.compiler/share/classes/com/sun/source/util/Plugin.java

+2
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ public interface Plugin {
7474
* command-line option.
7575
*
7676
* @return whether or not this plugin should be automatically started
77+
*
78+
* @since 14
7779
*/
7880
default boolean autoStart() {
7981
return false;

src/jdk.compiler/share/classes/com/sun/source/util/SimpleTreeVisitor.java

+4
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,8 @@ public R visitSwitch(SwitchTree node, P p) {
299299
* @param node {@inheritDoc}
300300
* @param p {@inheritDoc}
301301
* @return the result of {@code defaultAction}
302+
*
303+
* @since 14
302304
*/
303305
@Override
304306
public R visitSwitchExpression(SwitchExpressionTree node, P p) {
@@ -1047,6 +1049,8 @@ public R visitOther(Tree node, P p) {
10471049
* @param node {@inheritDoc}
10481050
* @param p {@inheritDoc}
10491051
* @return the result of {@code defaultAction}
1052+
*
1053+
* @since 14
10501054
*/
10511055
@Override
10521056
public R visitYield(YieldTree node, P p) {

src/jdk.compiler/share/classes/com/sun/source/util/TreeScanner.java

+4
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,8 @@ public R visitSwitch(SwitchTree node, P p) {
376376
* @param node {@inheritDoc}
377377
* @param p {@inheritDoc}
378378
* @return the result of scanning
379+
*
380+
* @since 14
379381
*/
380382
@Override
381383
public R visitSwitchExpression(SwitchExpressionTree node, P p) {
@@ -1200,6 +1202,8 @@ public R visitErroneous(ErroneousTree node, P p) {
12001202
* @param node {@inheritDoc}
12011203
* @param p {@inheritDoc}
12021204
* @return the result of scanning
1205+
*
1206+
* @since 14
12031207
*/
12041208
@Override
12051209
public R visitYield(YieldTree node, P p) {

0 commit comments

Comments
 (0)