RFR: 8252882: Clean up jdk.javadoc and the related parts of jdk.compiler

Pavel Rappo prappo at openjdk.java.net
Mon Sep 14 15:09:29 UTC 2020


On Mon, 14 Sep 2020 14:56:39 GMT, Vicente Romero <vromero at openjdk.org> wrote:

>> I was hoping to use the `assert` facility for the purposes it was designed for. That particular occurrence of `assert`
>> as well as others in this pull request are about asserting that **our code** is being correct rather than input being
>> correct. The invariants those assertions establish MUST hold regardless of the input.
>
> right in that case you should certainly use com.sun.tools.javac.util.Assert instead

I won't use the `com.sun.tools.javac.util.Assert` facility as it has a number of disadvantages over `assert` in that
particular case. However, I will remove `assert` statements and update the pull request.

Will that do?

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

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


More information about the compiler-dev mailing list