8247788: DocCommentParser should not reject standalone '>'

Reviewed-by: prappo
diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/DocCommentParser.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/DocCommentParser.java
index e7adca2..23aa520 100644
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/DocCommentParser.java
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/DocCommentParser.java
@@ -221,17 +221,6 @@
                     }
                     break;
 
-                case '>':
-                    newline = false;
-                    addPendingText(trees, bp - 1);
-                    trees.add(m.at(bp).newErroneousTree(newString(bp, bp + 1), diagSource, "dc.bad.gt"));
-                    nextChar();
-                    if (textStart == -1) {
-                        textStart = bp;
-                        lastNonWhite = -1;
-                    }
-                    break;
-
                 case '{':
                     inlineTag(trees);
                     break;
diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties
index d31b2a3..5268627 100644
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties
@@ -3140,9 +3140,6 @@
 compiler.err.dc.bad.entity=\
     bad HTML entity
 
-compiler.err.dc.bad.gt=\
-    bad use of ''>''
-
 compiler.err.dc.bad.inline.tag=\
     incorrect use of inline tag
 
diff --git a/test/langtools/jdk/javadoc/doclet/testJavaFX/TestJavaFX.java b/test/langtools/jdk/javadoc/doclet/testJavaFX/TestJavaFX.java
index 971b31c..8f441f1 100644
--- a/test/langtools/jdk/javadoc/doclet/testJavaFX/TestJavaFX.java
+++ b/test/langtools/jdk/javadoc/doclet/testJavaFX/TestJavaFX.java
@@ -39,6 +39,8 @@
 
     public static void main(String... args) throws Exception {
         TestJavaFX tester = new TestJavaFX();
+        tester.setAutomaticCheckAccessibility(false);
+        tester.setAutomaticCheckLinks(false);
         tester.runTests();
     }
 
@@ -353,6 +355,6 @@
         checkExit(Exit.OK);
 
         // make sure the doclet indeed emits the warning
-        checkOutput(Output.OUT, true, "C.java:0: warning - invalid usage of tag >");
+        checkOutput(Output.OUT, true, "C.java:0: warning - invalid usage of tag <");
     }
 }
diff --git a/test/langtools/jdk/javadoc/doclet/testJavaFX/pkg4/C.java b/test/langtools/jdk/javadoc/doclet/testJavaFX/pkg4/C.java
index 43f4a96..fffdc83 100644
--- a/test/langtools/jdk/javadoc/doclet/testJavaFX/pkg4/C.java
+++ b/test/langtools/jdk/javadoc/doclet/testJavaFX/pkg4/C.java
@@ -28,7 +28,7 @@
     /**
      * Defines the number of cycles in this animation. The {@code cycleCount}
      * may be {@code INDEFINITE} for animations that repeat indefinitely.
-     * Now we add a > to deliberately cause an Html error.
+     * Now we add <> to deliberately cause an Html error.
      * @defaultValue 11
      * @since JavaFX 8.0
      */
diff --git a/test/langtools/jdk/javadoc/doclet/testPackageHtml/TestPackageHtml.java b/test/langtools/jdk/javadoc/doclet/testPackageHtml/TestPackageHtml.java
index 5923280..15e72c4 100644
--- a/test/langtools/jdk/javadoc/doclet/testPackageHtml/TestPackageHtml.java
+++ b/test/langtools/jdk/javadoc/doclet/testPackageHtml/TestPackageHtml.java
@@ -46,7 +46,7 @@
                 "-sourcepath", testSrc,
                 "pkg1");
         checkExit(Exit.ERROR);
-        checkOutput(Output.OUT, true, "package.html:5: error: bad use of '>'");
+        checkOutput(Output.OUT, true, "package.html:4: error: malformed HTML");
     }
 
     // Doclet must handle empty body in package.html, must
diff --git a/test/langtools/jdk/javadoc/doclet/testPackageHtml/pkg1/package.html b/test/langtools/jdk/javadoc/doclet/testPackageHtml/pkg1/package.html
index a05dc5e..e20b235 100644
--- a/test/langtools/jdk/javadoc/doclet/testPackageHtml/pkg1/package.html
+++ b/test/langtools/jdk/javadoc/doclet/testPackageHtml/pkg1/package.html
@@ -1,8 +1,7 @@
 <HTML>
     <BODY>
-        <!-- generate a syntax error to verify that the file is parsed -->
         <pre>
-            &lt;opaque value="TRUE"/>
+            <123 value="TRUE"/>
         </pre>
     </BODY>
 </HTML>
diff --git a/test/langtools/tools/doclint/tidy/InvalidTag.out b/test/langtools/tools/doclint/tidy/InvalidTag.out
index fb67dc9..392ae86 100644
--- a/test/langtools/tools/doclint/tidy/InvalidTag.out
+++ b/test/langtools/tools/doclint/tidy/InvalidTag.out
@@ -1,10 +1,8 @@
+
 InvalidTag.java:14: error: unknown tag: String
  * List<String> list = new ArrayList<>();
        ^
 InvalidTag.java:14: error: malformed HTML
  * List<String> list = new ArrayList<>();
                                     ^
-InvalidTag.java:14: error: bad use of '>'
- * List<String> list = new ArrayList<>();
-                                     ^
-3 errors
+2 errors
diff --git a/test/langtools/tools/javac/diags/examples/BadGreaterThan.java b/test/langtools/tools/javac/diags/examples/BadGreaterThan.java
deleted file mode 100644
index f9be624..0000000
--- a/test/langtools/tools/javac/diags/examples/BadGreaterThan.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright (c) 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-// key: compiler.err.dc.bad.gt
-// key: compiler.note.note
-// key: compiler.note.proc.messager
-// run: backdoor
-// options: -processor DocCommentProcessor -proc:only
-
-/** > */
-class BadGreaterThan { }
-
diff --git a/test/langtools/tools/javac/doctree/ElementTest.java b/test/langtools/tools/javac/doctree/ElementTest.java
index 7951b2b..c2346b2 100644
--- a/test/langtools/tools/javac/doctree/ElementTest.java
+++ b/test/langtools/tools/javac/doctree/ElementTest.java
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 7021614 8078320
+ * @bug 7021614 8078320 8247788
  * @summary extend com.sun.source API to support parsing javadoc comments
  * @modules jdk.compiler/com.sun.tools.javac.api
  *          jdk.compiler/com.sun.tools.javac.file
@@ -93,13 +93,8 @@
     void bad_gt() { }
 /*
 DocComment[DOC_COMMENT, pos:1
-  firstSentence: 3
-    Text[TEXT, pos:1, abc_]
-    Erroneous[ERRONEOUS, pos:5
-      code: compiler.err.dc.bad.gt
-      body: >
-    ]
-    Text[TEXT, pos:6, _def]
+  firstSentence: 1
+    Text[TEXT, pos:1, abc_>_def]
   body: empty
   block tags: empty
 ]
@@ -111,18 +106,13 @@
     void bad_chars_start();
 /*
 DocComment[DOC_COMMENT, pos:1
-  firstSentence: 5
+  firstSentence: 3
     Text[TEXT, pos:1, abc_]
     Erroneous[ERRONEOUS, pos:5
       code: compiler.err.dc.malformed.html
       body: <
     ]
-    Text[TEXT, pos:6, p_123]
-    Erroneous[ERRONEOUS, pos:11
-      code: compiler.err.dc.bad.gt
-      body: >
-    ]
-    Text[TEXT, pos:12, _def]
+    Text[TEXT, pos:6, p_123>_def]
   body: empty
   block tags: empty
 ]
@@ -134,18 +124,13 @@
     void bad_chars_end();
 /*
 DocComment[DOC_COMMENT, pos:1
-  firstSentence: 5
+  firstSentence: 3
     Text[TEXT, pos:1, abc_]
     Erroneous[ERRONEOUS, pos:5
       code: compiler.err.dc.malformed.html
       body: <
     ]
-    Text[TEXT, pos:6, /p_123]
-    Erroneous[ERRONEOUS, pos:12
-      code: compiler.err.dc.bad.gt
-      body: >
-    ]
-    Text[TEXT, pos:13, _def]
+    Text[TEXT, pos:6, /p_123>_def]
   body: empty
   block tags: empty
 ]