Avoid heading tags in javadocs; fix EnvironmentTest (#6208)

Summary:
Should fix Travis build error that randomly showed up upon
using Java 13 version of javadoc.

    AdvancedColumnFamilyOptionsInterface.java:257: error:
      unexpected heading used: <H2>, compared to implicit preceding heading: <H3>

According to this reference https://bugs.openjdk.java.net/browse/JDK-8220379
it should work to start at h4, but that didn't work, so avoiding
headings should be fine.

Also fix Java EnvironmentTest for JDK13.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/6208

Test Plan: Travis run on PR (don't have Java 13 handy)

Differential Revision: D19163105

Pulled By: pdillinger

fbshipit-source-id: 4a9419cbe7ef780fba771b8a1508e1ea80d17b3e
This commit is contained in:
Peter Dillinger 2019-12-18 13:34:44 -08:00 committed by Facebook Github Bot
parent f453bcb40d
commit 7da8c067a2
2 changed files with 6 additions and 1 deletions

View File

@ -254,7 +254,8 @@ public interface AdvancedColumnFamilyOptionsInterface<
* levels extra size. After the data accumulates more so that we need to
* move the base level to the third last one, and so on.</p>
*
* <h2>Example</h2>
* <p><b>Example</b></p>
*
* <p>For example, assume {@code max_bytes_for_level_multiplier=10},
* {@code num_levels=6}, and {@code max_bytes_for_level_base=10MB}.</p>
*

View File

@ -229,9 +229,11 @@ public class EnvironmentTest {
try {
field = Environment.class.getDeclaredField(fieldName);
field.setAccessible(true);
/* Fails in JDK 13; and not needed unless fields are final
final Field modifiersField = Field.class.getDeclaredField("modifiers");
modifiersField.setAccessible(true);
modifiersField.setInt(field, field.getModifiers() & ~Modifier.FINAL);
*/
return (T)field.get(null);
} catch (NoSuchFieldException | IllegalAccessException e) {
throw new RuntimeException(e);
@ -243,9 +245,11 @@ public class EnvironmentTest {
try {
field = Environment.class.getDeclaredField(fieldName);
field.setAccessible(true);
/* Fails in JDK 13; and not needed unless fields are final
final Field modifiersField = Field.class.getDeclaredField("modifiers");
modifiersField.setAccessible(true);
modifiersField.setInt(field, field.getModifiers() & ~Modifier.FINAL);
*/
field.set(null, value);
} catch (NoSuchFieldException | IllegalAccessException e) {
throw new RuntimeException(e);