On Mon, 14 Sep 2020 14:08:50 GMT, Pavel Rappo <pra...@openjdk.org> wrote:
>> src/jdk.compiler/share/classes/com/sun/tools/javac/parser/DocCommentParser.java >> line 290: >> >>> 288: >>> 289: protected void inlineTag(ListBuffer<DCTree> list) { >>> 290: assert buf[bp] == '{' : buf[bp]; >> >> not sure that this is what you want to do. We usually use >> com.sun.tools.javac.util.Assert for this as they can't be >> skipped if the code is not executed with assertions off. Same for similar >> changes in this patch > > 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 ------------- PR: https://git.openjdk.java.net/jdk/pull/148