RFR: 8266666: Implementation for snippets [v7]
Jonathan Gibbons
jjg at openjdk.java.net
Tue Aug 24 14:36:34 UTC 2021
On Tue, 24 Aug 2021 11:30:54 GMT, Pavel Rappo <prappo at openjdk.org> wrote:
>> src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/doclets.properties line 360:
>>
>>> 358:
>>> 359: doclet.tag.attribute.repeated=\
>>> 360: repeated attribute: "{0}"
>>
>> check the resource file for other quoted values; I think you'll find single quotes are the prevailing standard.
>
> I didn't find single quotes to be the prevailing standard neither in `doclet.properties` nor in `compiler.properties`. In fact, it seems to be the opposite: whenever a parameter (not constant) is output, it's either unquoted or double-quoted. Did I look in the right place?
OK, it's not as dominant as I thought ... 2 to 1.
Grepping through English properties files `jdk.compiler` and `jdk.javadoc`, there are 142 lines containing `'` and 75 lines containing `"`
Maybe we should have a separate cleanup, after figuring out which form we should use.
>> src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/snippet/Parser.java line 177:
>>
>>> 175: }
>>> 176: thisLineTags.addAll(parsedTags);
>>> 177: for (var tagIterator = thisLineTags.iterator(); tagIterator.hasNext(); ) {
>>
>> oooh, not wrong; just unexpected mix of styles ;-)
>
> Can you be more specific? In what sense is this unexpected?
Just the combination of `var`, iterators, and a `for `(;;)` loop, that's all. Not wrong, just uncommon; it took me a double-take to parse it, that's all. The code is OK, no need to change it.
-------------
PR: https://git.openjdk.java.net/jdk/pull/4795
More information about the javadoc-dev
mailing list