Apache Lucene open-source search software
LUCENE-9213: fix documentation-lint (and finally precommit) to work on java 12 and 13
Robert Muir69f26d099ec3
diff --git a/dev-tools/scripts/checkJavaDocs.py b/dev-tools/scripts/checkJavaDocs.pyindex b43fcfb44ea..14ded3d4ec2 100644--- a/dev-tools/scripts/checkJavaDocs.py+++ b/dev-tools/scripts/checkJavaDocs.py@@ -22,7 +22,7 @@ reHREF = re.compile('<a.*?>(.*?)</a>', re.IGNORECASE)reMarkup = re.compile('<.*?>')reDivBlock = re.compile('<div class="block">(.*?)</div>', re.IGNORECASE)reCaption = re.compile('<caption><span>(.*?)</span>', re.IGNORECASE)-reJ8Caption = re.compile('<h3>(.*?) Summary</h3>')+reJ8Caption = re.compile('<h[23]>(.*?) Summary</h[23]>')reTDLastNested = re.compile('^<td class="colLast"><code><strong><a href="[^>]*\.([^>]*?)\.html" title="class in[^>]*">', re.IGNORECASE)reMethod = re.compile('^<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="[^>]*#([^>]*?)">', re.IGNORECASE)reColOne = re.compile('^<td class="colOne"><code><strong><a href="[^>]*#([^>]*?)">', re.IGNORECASE)@@ -31,8 +31,9 @@ reNestedClassMemberNameLink = re.compile('^<td class="colLast"><code><span classreMemberNameOneLink = re.compile('^<td class="colOne"><code><span class="memberNameLink"><a href="[^>]*#([^>]*?)"', re.IGNORECASE)# the Method detail section at the end-reMethodDetail = re.compile('^<h3>Method Detail</h3>$', re.IGNORECASE)+reMethodDetail = re.compile('^<h[23]>Method Details?</h[23]>$', re.IGNORECASE)reMethodDetailAnchor = re.compile('^(?:</a>)?<a id="([^>]*?)">$', re.IGNORECASE)+reJ13MethodDetailAnchor = re.compile('^(?:<h3>|</a>)<a id="([^>]*?)">[^>]*</a></h3>$', re.IGNORECASE)reTag = re.compile("(?i)<(\/?\w+)((\s+\w+(\s*=\s*(?:\".*?\"|'.*?'|[^'\">\s]+))?)+\s*|\s*)\/?>")@@ -176,7 +177,7 @@ def checkClassSummaries(fullPath):# they should be specified elsewhere, if they are e.g. jdk or# external classes we cannot inherit their docs anywayif foundMethodDetail:- m = reMethodDetailAnchor.search(line)+ m = reMethodDetailAnchor.search(line) or reJ13MethodDetailAnchor.search(line)if m is not None:lastMethodAnchor = m.group(1)continuediff --git a/lucene/common-build.xml b/lucene/common-build.xmlindex e04b25d4221..6122a8aac87 100644--- a/lucene/common-build.xml+++ b/lucene/common-build.xml@@ -332,9 +332,11 @@<contains string="${java.vm.name}" substring="openjdk" casesensitive="false"/><contains string="${java.vm.name}" substring="jrockit" casesensitive="false"/></or>- <equals arg1="${java.specification.version}" arg2="11"/>- <!-- TODO: Fix this! For now only run this on 64bit, because jTIDY OOMs with default heap size: -->- <!--<contains string="${os.arch}" substring="64"/>-->+ <or>+ <equals arg1="${java.specification.version}" arg2="11"/>+ <equals arg1="${java.specification.version}" arg2="12"/>+ <equals arg1="${java.specification.version}" arg2="13"/>+ </or></and></condition>