Skip to content

Commit 6030c0e

Browse files
liachjonathan-gibbons
authored andcommittedJun 1, 2022
8287118: Use monospace font for annotation default values
Reviewed-by: hannesw, jjg
1 parent 72bcf2a commit 6030c0e

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed
 

‎src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AnnotationTypeMemberWriterImpl.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ public void addDefaultValueInfo(Element member, Content annotationContent) {
270270
if (value != null) {
271271
var dl = HtmlTree.DL(HtmlStyle.notes);
272272
dl.add(HtmlTree.DT(contents.default_));
273-
dl.add(HtmlTree.DD(Text.of(value.toString())));
273+
dl.add(HtmlTree.DD(HtmlTree.CODE(Text.of(value.toString()))));
274274
annotationContent.add(dl);
275275
}
276276
}

‎test/langtools/jdk/javadoc/doclet/testAnnotationTypes/TestAnnotationTypes.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ public void test() {
141141
<div class="member-signature"><span class="return-type">java.lang.String</span>&nbsp;<span class="element-name">optional</span></div>
142142
<dl class="notes">
143143
<dt>Default:</dt>
144-
<dd>""</dd>
144+
<dd><code>""</code></dd>
145145
</dl>
146146
</section>
147147
</li>

‎test/langtools/jdk/javadoc/doclet/testHtmlDefinitionListTag/TestHtmlDefinitionListTag.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ void checkCommon(boolean checkC5) {
113113
"""
114114
<dl class="notes">
115115
<dt>Default:</dt>
116-
<dd>true</dd>
116+
<dd><code>true</code></dd>
117117
</dl>""");
118118

119119
// Test for valid HTML generation which should not comprise of empty

0 commit comments

Comments
 (0)
Please sign in to comment.