From 36d7c6b38d292f4246231560643aa0a5bf7bcc73 Mon Sep 17 00:00:00 2001 From: Michael McCandless Date: Fri, 13 Sep 2013 11:58:33 +0000 Subject: [PATCH] try to workaround javadocs bug causing nightly-smoke to fail git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1522885 13f79535-47bb-0310-9956-ffa450edef68 --- dev-tools/scripts/checkJavaDocs.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dev-tools/scripts/checkJavaDocs.py b/dev-tools/scripts/checkJavaDocs.py index c9aabcb68c5..e68f6072493 100644 --- a/dev-tools/scripts/checkJavaDocs.py +++ b/dev-tools/scripts/checkJavaDocs.py @@ -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 type parameter in {@link #getAttribute} and {@link #addAttribute} + line = line.replace('getAttribute(java.lang.Class)', 'getAttribute(java.lang.Class)') + line = line.replace('addAttribute(java.lang.Class)', 'addAttribute(java.lang.Class)') + m = reH3.search(line) if m is not None: if desc is not None: