RFR: 8253736: Cleanup some of WorkArounds and usage thereof
ksrini at openjdk.java.net
Fri Oct 2 00:10:06 UTC 2020
On Tue, 29 Sep 2020 20:25:27 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:
> This cleanup is primarily focussed on the WorkArounds class, simplifying/removing code that is no longer required.
> Also, simplified DocLint initialization such that it no longer needs a `JavacTask` and so the initiate code can be
> moved out of `WorkArounds`.
> The "constant value expression" in Utils is simplified to remove a redundant level of enclosing nested class for the
> type-kind visitor.
Nice to see WorkArounds being chipped away. It is not clear to me if additional tests are warranted for
getConstantValue for TestConstantValuesDriver.java, in langtools test I saw only ElementStructureTest.java. I will
leave it to you, maybe file a follow up issue.
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Utils.java line 2274:
> 2272: if (cve == null)
> 2273: cve = new ConstantValueExpression();
> 2274: return cve.visit(ve.asType(), ve.getConstantValue());
test/langtools/jdk/javadoc/doclet/constantValues/TestConstantValuesDriver.java line 60:
> 58: <code id="TestConstantValues.BYTE_MAX_VALUE">public static final byte</code></td>
> 59: <th class="col-second" scope="row"><code><a
> href="TestConstantValues.html#BYTE_MAX_VALUE">BYTE_MAX_VALUE</a></code></th> 60: <td
Should there be tests for Float, Double, Long ?
Marked as reviewed by ksrini (Reviewer).
More information about the compiler-dev