RFR: JDK-8275788: Create code element with suitable attributes for code snippets [v5]
    Hannes Wallnöfer 
    hannesw at openjdk.java.net
       
    Thu Nov  4 11:28:15 UTC 2021
    
    
  
On Wed, 3 Nov 2021 16:02:17 GMT, Pavel Rappo <prappo at openjdk.org> wrote:
>> Hannes Wallnöfer has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR.
>
> test/langtools/jdk/javadoc/doclet/testSnippetTag/TestSnippetTag.java line 212:
> 
>> 210:             classBuilder.addMembers(
>> 211:                     MethodBuilder.parse("public void case%s() { }".formatted(i))
>> 212:                             .setComments("A method.", s.content()));
> 
> Did you add that "A method." to increase test specificity?
I added the first "sentence" to have the snippet appear only in the details section, rather than both the summary and the detail sections. Since some of the snippets have id attributes, having the snippets rendered twice with a page would result in invalid HTML. I think it is acceptable behavior to not implement some "only render id once per page" logic, but it's good to bring it up and discuss it, so I'm glad you spotted this.
-------------
PR: https://git.openjdk.java.net/jdk/pull/6165
    
    
More information about the javadoc-dev
mailing list