# HG changeset patch
# User jjg
# Date 1349919286 25200
# Node ID 3114d240cf64b62ab8943a18dbc114f83e1def9b
# Parent 5d0d1fbcec863dcfb7f739be2238ef76c4dd3622
8000418: javadoc should used a standard "generated by javadoc" string
Reviewed-by: bpatel
diff -r 5d0d1fbcec86 -r 3114d240cf64 src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java
--- a/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java Fri Sep 27 21:20:01 2013 +0400
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java Wed Oct 10 18:34:46 2012 -0700
@@ -346,66 +346,6 @@
}
/**
- * Print the html file header. Also print Html page title and stylesheet
- * default properties.
- *
- * @param title String window title to go in the <TITLE> tag
- * @param metakeywords Array of String keywords for META tag. Each element
- * of the array is assigned to a separate META tag.
- * Pass in null for no array.
- * @param includeScript boolean true if printing windowtitle script.
- * False for files that appear in the left-hand frames.
- */
- public void printHtmlHeader(String title, String[] metakeywords,
- boolean includeScript) {
- println("");
- println("");
- html();
- head();
- if (! configuration.notimestamp) {
- print("");
- }
- if (configuration.charset.length() > 0) {
- println("");
- }
- if ( configuration.windowtitle.length() > 0 ) {
- title += " (" + configuration.windowtitle + ")";
- }
- title(title);
- println(title);
- titleEnd();
- println("");
- if (! configuration.notimestamp) {
- SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
- println("");
- }
- if ( metakeywords != null ) {
- for ( int i=0; i < metakeywords.length; i++ ) {
- println("");
- }
- }
- println("");
- printStyleSheetProperties();
- println("");
- // Don't print windowtitle script for overview-frame, allclasses-frame
- // and package-frame
- if (includeScript) {
- printWinTitleScript(title);
- }
- println("");
- headEnd();
- println("");
- body("white", includeScript);
- }
-
- /**
* Generates the HTML document tree and prints it out.
*
* @param metakeywords Array of String keywords for META tag. Each element
@@ -421,8 +361,7 @@
Content htmlComment = new Comment(configuration.getText("doclet.New_Page"));
Content head = new HtmlTree(HtmlTag.HEAD);
if (!configuration.notimestamp) {
- Content headComment = new Comment("Generated by javadoc (version " +
- ConfigurationImpl.BUILD_DATE + ") on " + today());
+ Content headComment = new Comment(getGeneratedByString());
head.addContent(headComment);
}
if (configuration.charset.length() > 0) {
diff -r 5d0d1fbcec86 -r 3114d240cf64 src/share/classes/com/sun/tools/doclets/formats/html/SerializedFormWriterImpl.java
--- a/src/share/classes/com/sun/tools/doclets/formats/html/SerializedFormWriterImpl.java Fri Sep 27 21:20:01 2013 +0400
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/SerializedFormWriterImpl.java Wed Oct 10 18:34:46 2012 -0700
@@ -49,23 +49,6 @@
}
/**
- * Writes the given header.
- *
- * @param header the header to write.
- */
- public void writeHeader(String header) {
- printHtmlHeader(header, null, true);
- printTop();
- navLinks(true);
- hr();
- center();
- h1();
- print(header);
- h1End();
- centerEnd();
- }
-
- /**
* Get the given header.
*
* @param header the header to write
diff -r 5d0d1fbcec86 -r 3114d240cf64 src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocWriter.java
--- a/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocWriter.java Fri Sep 27 21:20:01 2013 +0400
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocWriter.java Wed Oct 10 18:34:46 2012 -0700
@@ -29,6 +29,7 @@
import java.util.*;
import com.sun.javadoc.*;
+import com.sun.tools.doclets.formats.html.ConfigurationImpl;
import com.sun.tools.doclets.internal.toolkit.*;
@@ -328,7 +329,7 @@
Content htmlComment = new Comment(configuration.getText("doclet.New_Page"));
Content head = new HtmlTree(HtmlTag.HEAD);
if (! noTimeStamp) {
- Content headComment = new Comment("Generated by javadoc on " + today());
+ Content headComment = new Comment(getGeneratedByString());
head.addContent(headComment);
}
if (configuration.charset.length() > 0) {
@@ -390,16 +391,9 @@
print(" ");
}
- /**
- * Get the day and date information for today, depending upon user option.
- *
- * @return String Today.
- * @see java.util.Calendar
- * @see java.util.GregorianCalendar
- * @see java.util.TimeZone
- */
- public String today() {
+ protected String getGeneratedByString() {
Calendar calendar = new GregorianCalendar(TimeZone.getDefault());
- return calendar.getTime().toString();
+ Date today = calendar.getTime();
+ return "Generated by javadoc ("+ ConfigurationImpl.BUILD_DATE + ") on " + today;
}
}
diff -r 5d0d1fbcec86 -r 3114d240cf64 test/com/sun/javadoc/VersionNumber/VersionNumber.java
--- a/test/com/sun/javadoc/VersionNumber/VersionNumber.java Fri Sep 27 21:20:01 2013 +0400
+++ b/test/com/sun/javadoc/VersionNumber/VersionNumber.java Wed Oct 10 18:34:46 2012 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -84,7 +84,7 @@
// Test the proper DOCTYPE element is present:
{
- "