Merge "Ignore tags in comments that are actually Java annotations"
diff --git a/src/com/google/doclava/Comment.java b/src/com/google/doclava/Comment.java
index 63ace55..ea09788 100644
--- a/src/com/google/doclava/Comment.java
+++ b/src/com/google/doclava/Comment.java
@@ -387,8 +387,16 @@
         known = Doclava.knownTags.contains(name);
       }
       if (!known) {
-        Errors.error(Errors.UNKNOWN_TAG, pos == null ? null : new SourcePositionInfo(pos),
-            "Unknown tag: " + name);
+          if (name.length() >= 2 && Character.isUpperCase(name.charAt(1))) {
+              // This is a workaround for b/135928616 where parsing of comments fails when there is
+              // a Java annotation and not a tag.
+              Errors.error(Errors.JAVA_TAG_IN_COMMENT,
+                      pos == null ? null : new SourcePositionInfo(pos),
+                      "Invalid tag: " + name);
+          } else {
+              Errors.error(Errors.UNKNOWN_TAG, pos == null ? null : new SourcePositionInfo(pos),
+                      "Unknown tag: " + name);
+          }
       }
       TagInfo t = new TextTagInfo(name, name, text, pos);
       if (isInline) {
diff --git a/src/com/google/doclava/Errors.java b/src/com/google/doclava/Errors.java
index 6b0eee0..a7a3bdf 100644
--- a/src/com/google/doclava/Errors.java
+++ b/src/com/google/doclava/Errors.java
@@ -314,6 +314,7 @@
   public static final Error TODO = new Error(128, LINT);
   public static final Error NO_ARTIFACT_DATA = new Error(129, HIDDEN);
   public static final Error BROKEN_ARTIFACT_FILE = new Error(130, ERROR);
+  public static final Error JAVA_TAG_IN_COMMENT = new Error(131, LINT);
 
   public static boolean setErrorLevel(int code, int level) {
     for (Error e : sErrors) {