RFR [16] 8251939: Fix copy-paste issues and address TODOs
Pavel Rappo
pavel.rappo at oracle.com
Tue Aug 18 11:03:35 UTC 2020
Hello,
Please review the below inline patch for https://bugs.openjdk.java.net/browse/JDK-8251939. Although this patch modifies the wording of two public APIs, I don't think it requires a CSR for either of them.
Thanks,
-Pavel
diff --git a/src/jdk.compiler/share/classes/com/sun/source/tree/YieldTree.java b/src/jdk.compiler/share/classes/com/sun/source/tree/YieldTree.java
index ae82c72b4a3..181d0495774 100644
--- a/src/jdk.compiler/share/classes/com/sun/source/tree/YieldTree.java
+++ b/src/jdk.compiler/share/classes/com/sun/source/tree/YieldTree.java
@@ -1,12 +1,12 @@
/*
- * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 2020, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
@@ -26,21 +26,21 @@
package com.sun.source.tree;
/**
* A tree node for a {@code yield} statement.
*
* For example:
* <pre>
* yield <em>expression</em> ;
* </pre>
*
- * @jls section TODO
+ * @jls 14.21 The yield Statement
*
* @since 13
*/
public interface YieldTree extends StatementTree {
/**
* Returns the expression for this {@code yield} statement.
*
* @return the expression
*/
diff --git a/src/jdk.compiler/share/classes/com/sun/source/util/DocTreeScanner.java b/src/jdk.compiler/share/classes/com/sun/source/util/DocTreeScanner.java
index 631bac627e0..0ed59fe31b4 100644
--- a/src/jdk.compiler/share/classes/com/sun/source/util/DocTreeScanner.java
+++ b/src/jdk.compiler/share/classes/com/sun/source/util/DocTreeScanner.java
@@ -268,21 +268,21 @@ public class DocTreeScanner<R,P> implements DocTreeVisitor<R,P> {
* @param node {@inheritDoc}
* @param p {@inheritDoc}
* @return the result of scanning
*/
@Override
public R visitIdentifier(IdentifierTree node, P p) {
return null;
}
/**
- * {@inheritDoc} This implementation returns {@code null}.
+ * {@inheritDoc} This implementation scans the children in left to right order.
*
* @param node {@inheritDoc}
* @param p {@inheritDoc}
* @return the result of scanning
*/
@Override
public R visitIndex(IndexTree node, P p) {
R r = scan(node.getSearchTerm(), p);
r = scanAndReduce(node.getDescription(), p, r);
return r;
diff --git a/src/jdk.compiler/share/classes/com/sun/source/util/TreeScanner.java b/src/jdk.compiler/share/classes/com/sun/source/util/TreeScanner.java
index 46d173f5ba2..e7cff68e384 100644
--- a/src/jdk.compiler/share/classes/com/sun/source/util/TreeScanner.java
+++ b/src/jdk.compiler/share/classes/com/sun/source/util/TreeScanner.java
@@ -943,21 +943,21 @@ public class TreeScanner<R,P> implements TreeVisitor<R,P> {
* @param node {@inheritDoc}
* @param p {@inheritDoc}
* @return the result of scanning
*/
@Override
public R visitErroneous(ErroneousTree node, P p) {
return null;
}
/**
- * {@inheritDoc} This implementation returns {@code null}.
+ * {@inheritDoc} This implementation scans the children in left to right order.
*
* @param node {@inheritDoc}
* @param p {@inheritDoc}
* @return the result of scanning
*/
@Override
public R visitYield(YieldTree node, P p) {
return scan(node.getValue(), p);
}
}
More information about the compiler-dev
mailing list