GitHub user HyukjinKwon opened a pull request:
https://github.com/apache/spark/pull/15999
[WIP][SPARK-3359][BUILD][DOCS] More changes to resolve javadoc 8 errors
that will help unidoc/genjavadoc compatibility
## What changes were proposed in this pull request?
This PR only tries to fix things that looks pretty straightforward and were
fixed in previous PRs before.
This PR roughly fixes several things as below:
- Fix unrecognisable class and method links in javadoc by changing it from
`[[..]]` to `` `...` ``
```
[error]
.../spark/sql/core/target/java/org/apache/spark/sql/streaming/DataStreamReader.java:226:
error: reference not found
[error] * Loads text files and returns a {@link DataFrame} whose
schema starts with a string column named
[error] ^
```
- Fix an exception annotation and remove code backticks in `@throws`
annotation
Currently, sbt unidoc with Java 8 complains as below:
```
[error] .../java/org/apache/spark/sql/streaming/StreamingQuery.java:72:
error: unexpected text
[error] * @throws StreamingQueryException, if <code>this</code> query
has terminated with an exception.
```
`@throws` should specify the correct class name from
`StreamingQueryException,` to `StreamingQueryException` without backticks. (see
[JDK-8007644](https://bugs.openjdk.java.net/browse/JDK-8007644)).
- Fix `[[http..]]` to `<a href="http..."></a>`.
```diff
- *
[[https://blogs.oracle.com/java-platform-group/entry/diagnosing_tls_ssl_and_https
Oracle
- * blog page]].
+ * <a
href="https://blogs.oracle.com/java-platform-group/entry/diagnosing_tls_ssl_and_https">
+ * Oracle blog page</a>.
```
`[[http...]]` link markdown in scaladoc is unrecognisable in javadoc.
- It seems class can't have `@return` annotation. So, two cases of this
were removed.
```
[error]
.../java/org/apache/spark/mllib/regression/IsotonicRegression.java:27: error:
invalid use of @return
[error] * @return New instance of IsotonicRegression.
```
- Fix < to `<` > to `>` according to HTML rules.
- Fix `</p>` complaint
- Exclude unrecognisable in javadoc, `@constructor`, `@todo` and
`@groupname`.
## How was this patch tested?
Manually tested by `jekyll build` with Java 7 and 8
```
java version "1.7.0_80"
Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)
```
```
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)
```
Note: this does not yet make sbt unidoc suceed with Java 8 yet but it
reduces the number of errors with Java 8.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/HyukjinKwon/spark SPARK-3359-errors
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/15999.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #15999
----
commit 405ed5827966beec4e3d13bb57ddc062695b387e
Author: hyukjinkwon <[email protected]>
Date: 2016-11-21T07:14:16Z
Fix errors first round
commit 937de1915c98128e905ca471d66d99b97af3d3ae
Author: hyukjinkwon <[email protected]>
Date: 2016-11-23T05:25:54Z
Add throw annotations
commit 2c74b056e1b7e4746a9735a790e68fa6e286733f
Author: hyukjinkwon <[email protected]>
Date: 2016-11-23T08:20:02Z
Second fix
commit 00bdc0ed62488bbcb2b83dd3b96701bf72fd2330
Author: hyukjinkwon <[email protected]>
Date: 2016-11-23T09:45:00Z
Third fix
commit 4b4cb9b27d6e296a28e233e3e44923b246dd9358
Author: hyukjinkwon <[email protected]>
Date: 2016-11-23T09:59:21Z
Remove empty p element
commit 69f661575078c24f29e2b708228b41f0b15505b8
Author: hyukjinkwon <[email protected]>
Date: 2016-11-23T13:04:35Z
Fix wrongly formatted http URLs
commit c30ddfa4bafbeccf1eee0d87cffd1d6362a35f4a
Author: hyukjinkwon <[email protected]>
Date: 2016-11-23T15:16:57Z
Fix hyperlinks
commit 831e8e4656720aab0a8662ff70af8c9bc83dea1c
Author: hyukjinkwon <[email protected]>
Date: 2016-11-24T02:03:36Z
Fix typos and missed ones
commit cfce0e89a52bb96d38b7132f7d0bd45331d933e3
Author: hyukjinkwon <[email protected]>
Date: 2016-11-24T02:45:50Z
Fix wrongly printed code block
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]