On Wed, 18 Aug 2021 12:00:15 GMT, Hannes Wallnöfer <hann...@openjdk.org> wrote:

> What is the purpose of this rather complex method to format a text resource? 
> It seems like it is arguments `o1` and `o2` are never used. Couldn't this be 
> implemented simply using `MessageFormat` as it used to be?

This is the `DocTree` equivalent of similar code in `Content`, to format 
structured objects into a format string. Previously, using `MessageFormat`, the 
code used "regular" text to inject the name of the property. Now, using this 
new code, we can inject the equivalent of `{@code _name_ }`.

Yes, it is currently a bit more general than strictly required, in that 
currently we only require a single value to be injected. I guess I was just 
following the pattern of supporting future use.

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

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

Reply via email to