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:33 UTC

svn commit: r1522885 - in /lucene/dev/trunk: ./ dev-tools/ dev-tools/scripts/checkJavaDocs.py

Author: mikemccand
Date: Fri Sep 13 11:58:33 2013
New Revision: 1522885

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

Modified:
    lucene/dev/trunk/   (props changed)
    lucene/dev/trunk/dev-tools/   (props changed)
    lucene/dev/trunk/dev-tools/scripts/checkJavaDocs.py

Modified: lucene/dev/trunk/dev-tools/scripts/checkJavaDocs.py
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/dev-tools/scripts/checkJavaDocs.py?rev=1522885&r1=1522884&r2=1522885&view=diff
==============================================================================
--- lucene/dev/trunk/dev-tools/scripts/checkJavaDocs.py (original)
+++ lucene/dev/trunk/dev-tools/scripts/checkJavaDocs.py Fri Sep 13 11:58:33 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: