Skip to content

Commit 3eba0d9

Browse files
Fix JavaDoc on JDK 11. (#702)
- JDK 11 JavaDoc is less lenient with HTML tags inside a <code>-block, so this needed a fix. - We don’t use java-modules, so all modules are undefined. Therefor the search is broken. There are 2 solutions to the later: 1. Disabling modules in java-doc with `--no-module-directories`, but that also applies to references to JDK classes, which would than be broken. 2. (The one applied here): Check if `useModuleDirectories` is set to something different than literal `undefined`: If so, leave it and let JavaDocs JavaScript magic handle things, otherwise set it to false, causing JavaDocs JavaScript todo nothing. For reference: https://stackoverflow.com/a/57284322/1547989
1 parent 5a52375 commit 3eba0d9

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

driver/pom.xml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,17 @@
120120
<sourceFileIncludes>
121121
<sourceFileInclude>org/neo4j/driver/**/*.java</sourceFileInclude>
122122
</sourceFileIncludes>
123-
<excludePackageNames>org.neo4j.driver.internal</excludePackageNames>
123+
<excludePackageNames>org.neo4j.driver.internal</excludePackageNames>
124+
<bottom>
125+
<![CDATA[
126+
<script>
127+
if (typeof useModuleDirectories !== 'undefined') {
128+
useModuleDirectories = false;
129+
}
130+
</script>
131+
]]>
132+
</bottom>
133+
<additionalJOption>--allow-script-in-comments</additionalJOption>
124134
</configuration>
125135
</plugin>
126136
<plugin>

driver/src/main/javadoc/overview.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@ <h3>Example</h3>
3232
// and makes handling errors much easier.
3333
// Use `session.writeTransaction` for writes and `session.readTransaction` for reading data.
3434
// These methods are also able to handle connection problems and transient errors using an automatic retry mechanism.
35-
session.writeTransaction(tx -> tx.run("MERGE (a:Person {name: $x})", parameters("x", name)));
35+
session.writeTransaction(tx -&gt; tx.run("MERGE (a:Person {name: $x})", parameters("x", name)));
3636
}
3737
}
3838

3939
private void printPeople(String initial)
4040
{
4141
try (Session session = driver.session())
4242
{
43-
// A Managed Transaction transactions are a quick and easy way to wrap a Cypher Query.
43+
// A Managed transaction is a quick and easy way to wrap a Cypher Query.
4444
// The `session.run` method will run the specified Query.
4545
// This simpler method does not use any automatic retry mechanism.
4646
Result result = session.run(

0 commit comments

Comments
 (0)