You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by mi...@apache.org on 2013/09/13 13:58:14 UTC

svn commit: r1522884 - /lucene/dev/branches/branch_4x/dev-tools/scripts/checkJavaDocs.py

Author: mikemccand
Date: Fri Sep 13 11:58:14 2013
New Revision: 1522884

URL: http://svn.apache.org/r1522884
Log:
try to workaround javadocs bug causing nightly-smoke to fail

Modified:
    lucene/dev/branches/branch_4x/dev-tools/scripts/checkJavaDocs.py

Modified: lucene/dev/branches/branch_4x/dev-tools/scripts/checkJavaDocs.py
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/dev-tools/scripts/checkJavaDocs.py?rev=1522884&r1=1522883&r2=1522884&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/dev-tools/scripts/checkJavaDocs.py (original)
+++ lucene/dev/branches/branch_4x/dev-tools/scripts/checkJavaDocs.py Fri Sep 13 11:58:14 2013
@@ -80,6 +80,8 @@ def checkClassDetails(fullPath):
   Checks for invalid HTML in the full javadocs under each field/method.
   """
 
+  isAttributeSource = fullPath.endswith('AttributeSource.html')
+
   # TODO: only works with java7 generated javadocs now!
   with open(fullPath, encoding='UTF-8') as f:
     desc = None
@@ -87,6 +89,12 @@ def checkClassDetails(fullPath):
     item = None
     errors = []
     for line in f.readlines():
+
+      if isAttributeSource:
+        # Work around Javadocs bug that fails to escape the <T> type parameter in {@link #getAttribute} and {@link #addAttribute}
+        line = line.replace('<code>getAttribute(java.lang.Class<T>)</code>', '<code>getAttribute(java.lang.Class)</code>')
+        line = line.replace('<code>addAttribute(java.lang.Class<T>)</code>', '<code>addAttribute(java.lang.Class)</code>')
+      
       m = reH3.search(line)
       if m is not None:
         if desc is not None: