On Tue, 6 Oct 2020 04:08:12 GMT, Jonathan Gibbons <j...@openjdk.org> wrote:
> The types of `DocTree` parameters in some methods in `TagletWriter` can be > changed from `DocTree` to more specific subtypes. Doing so makes the code > less prone to incorrect calls, and removes the need for downcasting the > argument in the method bodies. > > This means the implementation of those methods can often be simplified. > > In addition, the call sites need to be improved, and with the help of some > improvements to methods in `Utils`, the methods that access different kinds > of trees can return the lists using a more specific subtype as well. > > Finally, a quick analysis of some of the `Utils` methods to access different > kinds of trees shows that there are some more convenient methods that can be > used instead. This pull request has now been integrated. Changeset: d0867578 Author: Jonathan Gibbons <j...@openjdk.org> URL: https://git.openjdk.java.net/jdk/commit/d0867578 Stats: 159 lines in 22 files changed: 55 ins; 18 del; 86 mod 8254052: improve type specificity of TagletWriter and friends Reviewed-by: hannesw ------------- PR: https://git.openjdk.java.net/jdk/pull/517