On Fri, 29 Oct 2021 12:39:46 GMT, Pavel Rappo <pra...@openjdk.org> wrote:

>> Separately. After b97ea5b, the CI 
>> (test/langtools/tools/javac/NoStringToLower.java) complains about that 
>> `switch` using String.toLowerCase without explicit locale. We have multiple 
>> options here (should we clean that up in a separate PR?):
>> 
>> - Specify the locale (`Locale.US`) (sometimes we specify Locale.ROOT)
>> - Use jdk.javadoc.internal.doclets.toolkit.util.Utils.toLowerCase
>> - Use com.sun.tools.javac.util.StringUtils.toLowerCase
>
>> I thought about (adding a comment about) making the mapping configurable, 
>> but I think any such mechanism would be much more complicated than just 
>> adding a "lang" attribute to your snippets.
> 
> If only we had a way to reuse a default taglet rather than completely replace 
> it, then this could be solved by simply providing an `@snippet` taglet with 
> custom mappings: `-taglet ExtendedSnippetTaglet`.

I went with jdk.javadoc.internal.doclets.toolkit.util.Utils.toLowerCase. If 
there is an existing nearby method that solves the problem I guess we should 
use it.

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

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

Reply via email to