Apache Solr open-source search software
Fix javadocs-linter: Windows support, support for file:-URLs (now needed), fix broken XML-comments in some files
Uwe Schindler92e5c35bc369
diff --git a/dev-tools/scripts/checkJavadocLinks.py b/dev-tools/scripts/checkJavadocLinks.pyindex 5a83e409c4c..736a3c8781a 100644--- a/dev-tools/scripts/checkJavadocLinks.py+++ b/dev-tools/scripts/checkJavadocLinks.py@@ -65,7 +65,7 @@ class FindHyperlinks(HTMLParser):href = href.strip()self.links.append(urlparse.urljoin(self.baseURL, href))else:- if self.baseURL.endswith(os.path.sep + 'AttributeSource.html'):+ if self.baseURL.endswith('/AttributeSource.html'):# LUCENE-4010: AttributeSource's javadocs has an unescaped <A> generics!! Seems to be a javadocs bug... (fixed in Java 7)passelse:@@ -126,7 +126,7 @@ def checkAll(dirName):main not in ('deprecated-list',):# Somehow even w/ java 7 generaged javadocs,# deprecated-list.html can fail to escape generics types- fullPath = os.path.join(root, f)+ fullPath = os.path.join(root, f).replace(os.path.sep,'/')#print ' %s' % fullPathallFiles[fullPath] = parse(fullPath, open('%s/%s' % (root, f), encoding='UTF-8').read())@@ -194,8 +194,13 @@ def checkAll(dirName):# on annotations it seems?passelif link.startswith('file:'):- # TODO: fix file: paths (need to parse URL, unescape %XX and so on)- pass+ filepath = urlparse.unquote(urlparse.urlparse(link).path)+ if not (os.path.exists(filepath) or os.path.exists(filepath[1:])):+ if not printed:+ printed = True+ print()+ print(fullPath)+ print(' BROKEN LINK: %s' % link)elif link not in allFiles:# We only load HTML... so if the link is another resource (eg# SweetSpotSimilarity refsdiff --git a/lucene/build.xml b/lucene/build.xmlindex 13cf08bccaf..638ed81a79d 100644--- a/lucene/build.xml+++ b/lucene/build.xml@@ -239,7 +239,7 @@<target name="javadocs" description="Generate javadoc" depends="javadocs-lucene-core, javadocs-modules, javadocs-test-framework"/><!-- we check for broken links across all documentation -->- <target name="javadocs-lint" depends="documentation">+ <target name="javadocs-lint" ><sequential><check-broken-links dir="build/docs"/><!-- TODO: change this level=class -->diff --git a/lucene/facet/src/java/org/apache/lucene/facet/package.html b/lucene/facet/src/java/org/apache/lucene/facet/package.htmlindex fee0c71dc0b..a08531a1aa3 100644--- a/lucene/facet/src/java/org/apache/lucene/facet/package.html+++ b/lucene/facet/src/java/org/apache/lucene/facet/package.html@@ -19,7 +19,6 @@<title>Faceted Indexing and Search</title></head><body>- <!-- NOTE: if you update the userguide link, also update the one in src/java/overview.html -->Provides faceted indexing and search capabilities. The <a href="doc-files/userguide.html">userguide</a> is recommended for a start.</body></html>diff --git a/lucene/facet/src/java/org/apache/lucene/facet/search/results/package.html b/lucene/facet/src/java/org/apache/lucene/facet/search/results/package.htmlindex 3acd35a9e7c..1a05c38dab2 100644--- a/lucene/facet/src/java/org/apache/lucene/facet/search/results/package.html+++ b/lucene/facet/src/java/org/apache/lucene/facet/search/results/package.html@@ -20,15 +20,8 @@</head><body><h1>Results of Faceted Search</h1>- <!--<p>The results of facets accumulation are obtained as a list of {@link org.apache.lucene.facet.search.results.FacetResult} elements.- See two API calls for obtaining these results:- <ul>- <li></li>- </ul>-</p>- --></body></html>\ No newline at end of filediff --git a/lucene/facet/src/java/overview.html b/lucene/facet/src/java/overview.htmlindex ab505e311ee..93ce4b66050 100644--- a/lucene/facet/src/java/overview.html+++ b/lucene/facet/src/java/overview.html@@ -21,7 +21,6 @@</title></head><body>- <!-- NOTE: if you update the userguide link, also update the one in o.a.l.facet/package.html -->Provides faceted indexing and search capabilities (checkout the <a href="org/apache/lucene/facet/doc-files/userguide.html">userguide</a>).</body></html>diff --git a/solr/core/src/java/org/apache/solr/util/FileUtils.java b/solr/core/src/java/org/apache/solr/util/FileUtils.javaindex 6cfbc3d5fe4..c8229a6d3d1 100644--- a/solr/core/src/java/org/apache/solr/util/FileUtils.java+++ b/solr/core/src/java/org/apache/solr/util/FileUtils.java@@ -54,7 +54,7 @@ public class FileUtils {}/**- * Copied from Lucene's FSDirectory.fsync(String) <!-- protected -->+ * Copied from Lucene's FSDirectory.fsync(String)** @param fullFile the File to be synced to disk* @throws IOException if the file could not be synced