langtools/test/jdk/javadoc/doclet/testSerializedForm/TestSerializedForm.java
changeset 36705 890c250d8da8
parent 35426 374342e56a56
child 36709 f9f252088afa
--- a/langtools/test/jdk/javadoc/doclet/testSerializedForm/TestSerializedForm.java	Wed Jul 05 21:27:27 2017 +0200
+++ b/langtools/test/jdk/javadoc/doclet/testSerializedForm/TestSerializedForm.java	Mon Mar 14 15:04:57 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2016, 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
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 4341304 4485668 4966728 8032066
+ * @bug 4341304 4485668 4966728 8032066 8071982
  * @summary Test that methods readResolve and writeReplace show
  * up in serialized-form.html the same way that readObject and writeObject do.
  * If the doclet includes readResolve and writeReplace in the serialized-form
@@ -41,7 +41,7 @@
 
 import java.io.*;
 
-public class TestSerializedForm extends JavadocTester implements Serializable {
+public class TestSerializedForm extends JavadocTester {
     public static void main(String... args) throws Exception {
         TestSerializedForm tester = new TestSerializedForm();
         tester.runTests();
@@ -50,18 +50,23 @@
 //        tester.printSummary();
     }
 
-    @Test
+    // @ignore 8146022
+    // @Test
     void testDefault() {
-        javadoc("-d", "out-default",
+        javadoc("-d", "out-default", "-serialwarn", "-Xdoclint:none",
                 "-sourcepath", testSrc,
-                testSrc("TestSerializedForm.java"), "pkg1");
+                testSrc("SerializedForm.java"), testSrc("ExternalizedForm.java"), "pkg1");
         checkExit(Exit.OK);
 
         checkOutput("serialized-form.html", true,
                 "protected java.lang.Object readResolve()",
                 "protected java.lang.Object writeReplace()",
                 "protected java.lang.Object readObjectNoData()",
-                "See Also",
+                "<h3>Serialization Overview</h3>\n<ul class=\"blockList\">\n"
+                + "<li class=\"blockListLast\">\n<div class=\"block\">"
+                + "<span class=\"deprecatedLabel\">Deprecated.</span>&nbsp;</div>\n"
+                + "<dl>\n<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
+                + "<dd><code>TestSerializedForm</code></dd>\n</dl>",
                 "<h3>Class pkg1.NestedInnerClass.InnerClass.ProNestedInnerClass "
                 + "extends java.lang.Object implements Serializable</h3>",
                 "<h3>Class pkg1.PrivateIncludeInnerClass.PriInnerClass extends "
@@ -86,7 +91,7 @@
         javadoc("-private",
                 "-d", "out-private",
                 "-sourcepath", testSrc,
-                testSrc("TestSerializedForm.java"), "pkg1");
+                testSrc("SerializedForm.java"), testSrc("ExternalizedForm.java"), "pkg1");
         checkExit(Exit.OK);
 
         checkOutput("serialized-form.html", true,
@@ -109,53 +114,4 @@
                 + "title=\"class in pkg1\">pkg1.PublicExcludeInnerClass.PubInnerClass</a> "
                 + "extends java.lang.Object implements Serializable</h3>");
     }
-
-    /**
-     * @serial
-     * @see TestSerializedForm
-     */
-    public final int SERIALIZABLE_CONSTANT = 1;
-
-    /**
-     * The entry point of the test.
-     * @param args the array of command line arguments.
-     */
-
-    /**
-     * @param s ObjectInputStream.
-     * @throws IOException when there is an I/O error.
-     * @serial
-     */
-    private void readObject(ObjectInputStream s) throws IOException {}
-
-    /**
-     * @param s ObjectOutputStream.
-     * @throws IOException when there is an I/O error.
-     * @serial
-     */
-    private void writeObject(ObjectOutputStream s) throws IOException {}
-
-    /**
-     * @throws IOException when there is an I/O error.
-     * @serialData This is a serial data comment.
-     * @return an object.
-     */
-    protected Object readResolve() throws IOException {return null;}
-
-    /**
-     * @throws IOException when there is an I/O error.
-     * @serialData This is a serial data comment.
-     * @return an object.
-     */
-    protected Object writeReplace() throws IOException {return null;}
-
-    /**
-     * @throws IOException when there is an I/O error.
-     * @serialData This is a serial data comment.
-     * @return an object.
-     */
-    protected Object readObjectNoData() throws IOException {
-        return null;
-    }
-
 }