On Tue, 29 Sep 2020 20:25:27 GMT, Jonathan Gibbons <j...@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());

yay

test/langtools/jdk/javadoc/doclet/constantValues/TestConstantValuesDriver.java 
line 60:

> 58:                     <code 
> id="TestConstantValues.BYTE_MAX_VALUE">public&nbsp;static&nbsp;final&nbsp;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
> class="col-last"><code>0x7f</code></td>""",

Should there be tests for Float, Double, Long ?

-------------

Marked as reviewed by ksrini (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/412

Reply via email to