This repository was archived by the owner on Aug 27, 2022. It is now read-only.
File tree 3 files changed +11
-11
lines changed
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup
test/langtools/jdk/javadoc/doclet
3 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -294,8 +294,9 @@ private Content toContent() {
294
294
295
295
private Comment getGeneratedBy (boolean timestamp , Date now ) {
296
296
String text = "Generated by javadoc" ; // marker string, deliberately not localized
297
+ text += " (" + docletVersion + ")" ;
297
298
if (timestamp ) {
298
- text += " (" + docletVersion + ") on " + now ;
299
+ text += " on " + now ;
299
300
}
300
301
return new Comment (text );
301
302
}
Original file line number Diff line number Diff line change 23
23
24
24
/*
25
25
* @test
26
- * @bug 8000418 8024288 8196202
26
+ * @bug 8000418 8024288 8196202 8243113
27
27
* @summary Verify that files use a common Generated By string
28
28
* @library ../../lib
29
29
* @modules jdk.javadoc/jdk.javadoc.internal.tool
@@ -80,19 +80,17 @@ void checkTimestamps(boolean timestamp) {
80
80
81
81
void checkTimestamps (boolean timestamp , String ... files ) {
82
82
String version = System .getProperty ("java.version" );
83
- String genBy = "Generated by javadoc" ;
84
- if (timestamp ) genBy += " (" + version + ") on " ;
83
+ String genBy = "Generated by javadoc (" + version + ") " ;
84
+ if (timestamp ) genBy += " on " ;
85
85
86
86
for (String file : files ) {
87
87
// genBy is the current standard "Generated by" text
88
88
checkOutput (file , true , genBy );
89
89
90
90
// These are older versions of the "Generated by" text
91
91
checkOutput (file , false ,
92
- (timestamp
93
- ? "Generated by javadoc (version"
94
- : "Generated by javadoc (" ),
95
- "Generated by javadoc on" );
92
+ "Generated by javadoc (version" ,
93
+ "Generated by javadoc on" );
96
94
}
97
95
}
98
96
}
Original file line number Diff line number Diff line change 23
23
24
24
/*
25
25
* @test
26
- * @bug 8203792
26
+ * @bug 8203792 8243113
27
27
* @summary Remove "compatibility" features from Head.java
28
28
* @library /tools/lib ../../lib
29
29
* @modules jdk.javadoc/jdk.javadoc.internal.tool
44
44
public class TestHeadTag extends JavadocTester {
45
45
46
46
final ToolBox tb ;
47
+ final String version = System .getProperty ("java.version" );
47
48
48
49
public static void main (String ... args ) throws Exception {
49
50
TestHeadTag tester = new TestHeadTag ();
@@ -67,7 +68,7 @@ public void test(Path base) throws Exception {
67
68
checkExit (Exit .OK );
68
69
69
70
checkOrder ("pkg/A.html" ,
70
- "Generated by javadoc" ,
71
+ "Generated by javadoc (" + version + ") " ,
71
72
"<meta name=\" dc.created\" " );
72
73
}
73
74
@@ -85,7 +86,7 @@ public void testWithNoTimestamp(Path base) throws Exception {
85
86
checkExit (Exit .OK );
86
87
87
88
checkOutput ("pkg/A.html" , true ,
88
- "<!-- Generated by javadoc -->" );
89
+ "<!-- Generated by javadoc (" + version + ") -->" );
89
90
checkOutput ("pkg/A.html" , false ,
90
91
"<meta name=\" dc.created\" " );
91
92
}
You can’t perform that action at this time.
0 commit comments