On Thu, 9 Mar 2023 19:51:03 GMT, Jonathan Gibbons <[email protected]> wrote:
>> Pavel Rappo has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Respond to feedback > > src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/VisibleMemberTable.java > line 302: > >> 300: // TODO: consider possible ambiguities: multiple overridden >> methods >> 301: ensureInitialized(); >> 302: assert !overriddenMethodTable.containsKey(null); > > can we somehow do the assert at the time of `put` ? We sure can, but that might complicate the patch even more. The beauty of assertions is that you can make them anywhere you like. Here, it nicely pairs with the `get` method suggesting that `map.get(x) == null` is the same as `map.containsKey(x)`. Also, please consider this commit as a big but still intermediate step: it sprinkles code with assertions to better capture what's going on (as far as we/I understand it), but eventually most structures, including `overriddenMethodTable`, will be replaced. ------------- PR: https://git.openjdk.org/jdk/pull/12887
