From 7da8c067a2bf3403f6146f001006e9a6ec12f75d Mon Sep 17 00:00:00 2001 From: Peter Dillinger Date: Wed, 18 Dec 2019 13:34:44 -0800 Subject: [PATCH] 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:

, compared to implicit preceding heading:

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 --- .../org/rocksdb/AdvancedColumnFamilyOptionsInterface.java | 3 ++- java/src/test/java/org/rocksdb/util/EnvironmentTest.java | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/java/src/main/java/org/rocksdb/AdvancedColumnFamilyOptionsInterface.java b/java/src/main/java/org/rocksdb/AdvancedColumnFamilyOptionsInterface.java index 91e3b2fa2..772a5900b 100644 --- a/java/src/main/java/org/rocksdb/AdvancedColumnFamilyOptionsInterface.java +++ b/java/src/main/java/org/rocksdb/AdvancedColumnFamilyOptionsInterface.java @@ -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.

* - *

Example

+ *

Example

+ * *

For example, assume {@code max_bytes_for_level_multiplier=10}, * {@code num_levels=6}, and {@code max_bytes_for_level_base=10MB}.

* diff --git a/java/src/test/java/org/rocksdb/util/EnvironmentTest.java b/java/src/test/java/org/rocksdb/util/EnvironmentTest.java index ab0ff2027..5bade90ca 100644 --- a/java/src/test/java/org/rocksdb/util/EnvironmentTest.java +++ b/java/src/test/java/org/rocksdb/util/EnvironmentTest.java @@ -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);