Skip to content

Commit 44d2a05

Browse files
dfa1claude
andcommitted
style: migrate Javadoc HTML tags → Markdown (S7474)
Replace <p>, <ul>/<li>, <strong>, <pre> and <table> HTML tags across 38 files with Markdown equivalents (blank lines, - lists, **bold**, ```java blocks, | tables). Add RegexpSingleline checkstyle rule to ban HTML block tags in /// Markdown Javadoc going forward; document convention in CLAUDE.md. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent a624d3d commit 44d2a05

40 files changed

Lines changed: 118 additions & 119 deletions

CLAUDE.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,10 @@ arrives that cannot be addressed by choosing a different encoding for a flat seg
290290

291291
- indents are 4 spaces, enforced by checkstyle
292292
- Zero SonarQube bugs/smells policy.
293+
- **Javadoc style:** all `///` Markdown Javadoc — no HTML tags. Use Markdown syntax:
294+
blank `///` line for paragraph break, `- item` for lists, ` ```java ``` ` for code
295+
blocks, `**text**` for bold. Checkstyle enforces this (`RegexpSingleline` rule in
296+
`checkstyle.xml` blocks `<p>`, `<ul>`, `<li>`, `<strong>`, `<pre>`, `<table>`, etc.).
293297
- No `sun.misc.Unsafe` or internal JDK APIs.
294298
- Prefer explicit over clever. Fail fast on unhandled cases.
295299
- Always prefer idiomatic modern Java. Reuse the standard library and language

checkstyle.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,16 @@
1616
<property name="message" value="Line has trailing spaces."/>
1717
</module>
1818

19+
<!-- Ban HTML block/structure tags in /// Markdown Javadoc.
20+
Use Markdown syntax instead: blank lines for paragraphs, - for lists,
21+
``` for code blocks, **text** for bold. -->
22+
<module name="RegexpSingleline">
23+
<property name="format" value="^\s*///.*&lt;(p|ul|/ul|li|/li|pre|/pre|strong|/strong|table|/table|tr|/tr|th|/th|td|/td)(\s|&gt;|/)"/>
24+
<property name="minimum" value="0"/>
25+
<property name="maximum" value="0"/>
26+
<property name="message" value="HTML tags forbidden in Markdown Javadoc (///). Use Markdown: blank line for paragraph, - for list, ``` for code, **text** for bold."/>
27+
</module>
28+
1929
<module name="SuppressionSingleFilter">
2030
<property name="files" value="[\\/](fbs|proto)[\\/]"/>
2131
</module>

core/src/main/java/io/github/dfa1/vortex/core/PType.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public boolean isSigned() {
5959
/// Returns the {@link PType} for the given enum ordinal — the integer value the wire format
6060
/// uses to identify a physical type.
6161
///
62-
/// <p>Unlike {@code PType.values()[ordinal]}, this method validates the ordinal against the
62+
/// Unlike {@code PType.values()[ordinal]}, this method validates the ordinal against the
6363
/// declared range and throws {@link VortexException} for crafted out-of-range values rather
6464
/// than the JDK's {@link ArrayIndexOutOfBoundsException}. Use this at every decode site that
6565
/// reads a ptype from untrusted metadata.

core/src/main/java/io/github/dfa1/vortex/core/VortexException.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66

77
/// Unrecoverable Vortex error: malformed file, unsupported feature, or encoding failure.
88
///
9-
/// <p><strong>Non-recoverable contract:</strong> once thrown, the underlying file or stream is
9+
/// **Non-recoverable contract:** once thrown, the underlying file or stream is
1010
/// in an indeterminate state. Callers must propagate this exception — do not catch-and-swallow,
1111
/// do not retry on the same input. The correct response is to abort the read, surface the error,
1212
/// and close the {@code VortexFile}.
1313
///
14-
/// <p>Carries an optional {@link EncodingId} for diagnostic attribution; it is not intended
14+
/// Carries an optional {@link EncodingId} for diagnostic attribution; it is not intended
1515
/// for recovery logic.
1616
public final class VortexException extends RuntimeException {
1717

inspector/src/main/java/io/github/dfa1/vortex/inspect/ZonedStatsSchema.java

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,23 @@
1010
/// Reconstructs the per-zone statistics-table {@link DType} for a
1111
/// {@code vortex.stats} (Zoned) layout.
1212
///
13-
/// <p>The shape is sourced from the Rust reference implementation:
14-
/// <ul>
15-
/// <li>Metadata format
13+
/// The shape is sourced from the Rust reference implementation:
14+
/// - Metadata format
1615
/// (<a href="https://github.com/spiraldb/vortex/blob/develop/vortex-layout/src/layouts/zoned/mod.rs">
1716
/// vortex-layout/src/layouts/zoned/mod.rs</a> — {@code ZonedMetadata}):
1817
/// bytes [0..4) are the zone length as a little-endian {@code u32};
1918
/// remaining bytes form a {@code Stat} bitset (LSB-first per byte). Each
2019
/// set bit at index {@code i} indicates that the {@link Stat} with that
21-
/// ordinal is present in the auxiliary stats table.</li>
22-
/// <li>Schema construction
20+
/// ordinal is present in the auxiliary stats table.
21+
/// - Schema construction
2322
/// (<a href="https://github.com/spiraldb/vortex/blob/develop/vortex-layout/src/layouts/zoned/schema.rs">
2423
/// vortex-layout/src/layouts/zoned/schema.rs</a> — {@code stats_table_dtype}):
2524
/// for each present stat in ordinal order, append a struct field with the
2625
/// stat's name and the stat's nullable dtype. {@code Max} and {@code Min}
2726
/// each get an extra trailing field {@code max_is_truncated} /
28-
/// {@code min_is_truncated} of type {@code Bool} (non-nullable).</li>
29-
/// </ul>
27+
/// {@code min_is_truncated} of type {@code Bool} (non-nullable).
3028
///
31-
/// <p>{@code Sum} widening rules and Decimal handling are not yet implemented —
29+
/// {@code Sum} widening rules and Decimal handling are not yet implemented —
3230
/// when the column dtype has no resolvable stat dtype the stat is skipped so
3331
/// the inspector degrades to "no schema" rather than failing.
3432
public final class ZonedStatsSchema {
@@ -92,7 +90,7 @@ public static long zoneLength(ByteBuffer metadata) {
9290

9391
/// Returns the stats present in the layout metadata bitset, in ordinal order.
9492
///
95-
/// <p>Unknown bits (set at an index past {@link Stat#values()}'s length, which
93+
/// Unknown bits (set at an index past {@link Stat#values()}'s length, which
9694
/// would mean a newer Vortex writer) are silently skipped — matching the Rust
9795
/// reader's forward-compatibility behaviour.
9896
///
@@ -122,12 +120,12 @@ public static List<Stat> presentStats(ByteBuffer metadata) {
122120
/// Reconstructs the per-zone stats-table dtype for the given column dtype
123121
/// and metadata.
124122
///
125-
/// <p>The result is a {@link io.github.dfa1.vortex.core.DType.Struct} mirroring
123+
/// The result is a {@link io.github.dfa1.vortex.core.DType.Struct} mirroring
126124
/// the order produced by Rust's {@code stats_table_dtype}: for every present stat
127125
/// in ordinal order, append a {@code (name, nullable dtype)} field; Max/Min each
128126
/// add a trailing {@code _is_truncated} Bool (non-nullable) flag.
129127
///
130-
/// <p>If a stat has no resolvable dtype for the given column (e.g. {@code Sum}
128+
/// If a stat has no resolvable dtype for the given column (e.g. {@code Sum}
131129
/// over an extension type without storage), it is omitted from the struct.
132130
///
133131
/// @param columnDtype the column's logical dtype (the {@code data} child's dtype)
@@ -168,21 +166,19 @@ public static DType.Struct statsTableDtype(DType columnDtype, List<Stat> present
168166
/// dtype, or {@code null} if the stat has no defined dtype for that column
169167
/// (in which case it is dropped from the stats table).
170168
///
171-
/// <p>Mirrors Rust's {@code Stat::dtype(&DType)} plus the aggregate-function
169+
/// Mirrors Rust's {@code Stat::dtype(&DType)} plus the aggregate-function
172170
/// return-type rules (see
173171
/// <a href="https://github.com/spiraldb/vortex/blob/develop/vortex-array/src/aggregate_fn/fns">
174172
/// vortex-array/src/aggregate_fn/fns</a>):
175-
/// <ul>
176-
/// <li>min/max → same dtype as column (except DType.Null → null);</li>
177-
/// <li>is_constant/is_sorted/is_strict_sorted → non-nullable Bool;</li>
178-
/// <li>null_count → non-nullable U64;</li>
179-
/// <li>uncompressed_size_in_bytes → non-nullable U64;</li>
180-
/// <li>nan_count → non-nullable U64 (only for float columns);</li>
181-
/// <li>sum → nullable U64 / I64 / F64 depending on column ptype; null for
182-
/// unsupported column dtypes.</li>
183-
/// </ul>
173+
/// - min/max → same dtype as column (except DType.Null → null);
174+
/// - is_constant/is_sorted/is_strict_sorted → non-nullable Bool;
175+
/// - null_count → non-nullable U64;
176+
/// - uncompressed_size_in_bytes → non-nullable U64;
177+
/// - nan_count → non-nullable U64 (only for float columns);
178+
/// - sum → nullable U64 / I64 / F64 depending on column ptype; null for
179+
/// unsupported column dtypes.
184180
///
185-
/// <p>For Extension column dtypes, the storage dtype is consulted as a backward-compat
181+
/// For Extension column dtypes, the storage dtype is consulted as a backward-compat
186182
/// fallback (matching the {@code or_else} branch in Rust's
187183
/// {@code stats_table_dtype}).
188184
///

parquet/src/main/java/io/github/dfa1/vortex/parquet/ParquetImporter.java

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,12 @@
3333
/// 0 for numeric types, {@code false} for bool, {@code ""} for strings.
3434
///
3535
/// Supported Parquet physical types:
36-
/// <ul>
37-
/// <li>BOOLEAN → Bool</li>
38-
/// <li>INT32 (no annotation / IntType 8/16/32, signed or unsigned) → I8/U8/I16/U16/I32/U32</li>
39-
/// <li>INT64 (no annotation / IntType 64, signed or unsigned) → I64/U64</li>
40-
/// <li>FLOAT → F32</li>
41-
/// <li>DOUBLE → F64</li>
42-
/// <li>BYTE_ARRAY annotated STRING, ENUM, or JSON → Utf8</li>
43-
/// </ul>
36+
/// - BOOLEAN → Bool
37+
/// - INT32 (no annotation / IntType 8/16/32, signed or unsigned) → I8/U8/I16/U16/I32/U32
38+
/// - INT64 (no annotation / IntType 64, signed or unsigned) → I64/U64
39+
/// - FLOAT → F32
40+
/// - DOUBLE → F64
41+
/// - BYTE_ARRAY annotated STRING, ENUM, or JSON → Utf8
4442
///
4543
/// All other physical types (INT96, FIXED_LEN_BYTE_ARRAY, unannotated BYTE_ARRAY, DECIMAL,
4644
/// DATE, TIME, TIMESTAMP) throw {@link UnsupportedOperationException}.

performance/src/main/java/io/github/dfa1/vortex/performance/RustWritesJavaReadsBigFileBenchmark.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,16 @@
5050
/// Big-file scan benchmark for files exceeding 2 GB ({@link io.github.dfa1.vortex.reader.SegmentSpec#length()}
5151
/// is {@code long}, so segments up to 4 GB are supported).
5252
///
53-
/// <p>Setup: JNI writer produces a >2 GB Vortex file with 4 incompressible I64 columns
53+
/// Setup: JNI writer produces a >2 GB Vortex file with 4 incompressible I64 columns
5454
/// (random longs defeat bit-packing / FoR so the segments stay large). Measurement: pure-Java
5555
/// `VortexReader` scans every column and sums the first column.
5656
///
57-
/// <p>The trial setup writes ~3 GB to disk and takes tens of seconds, so this benchmark is
57+
/// The trial setup writes ~3 GB to disk and takes tens of seconds, so this benchmark is
5858
/// intended for occasional runs (e.g. before tagging a release). To skip the JNI write, pass
5959
/// {@code -Dvortex.bench.bigfile=/path/to/existing.vtx} — useful when iterating on the read
6060
/// path against the same fixture.
6161
///
62-
/// <p>Run: {@code java -jar performance/target/benchmarks.jar RustWritesJavaReadsBigFileBenchmark.javaScan}
62+
/// Run: {@code java -jar performance/target/benchmarks.jar RustWritesJavaReadsBigFileBenchmark.javaScan}
6363
@State(Scope.Benchmark)
6464
@BenchmarkMode(Mode.Throughput)
6565
@OutputTimeUnit(TimeUnit.SECONDS)

reader/src/main/java/io/github/dfa1/vortex/reader/ExtensionDecoder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
/// Read-side contract for a Vortex extension type.
77
///
8-
/// <p>Implementations pair a spec identity ({@link ExtensionId}) with the matching
8+
/// Implementations pair a spec identity ({@link ExtensionId}) with the matching
99
/// {@link DType.Extension} dtype. Typed decode methods live on each concrete
1010
/// implementation — they are not on this interface, so read callers get typed return
1111
/// values without casting through {@code Object}.

reader/src/main/java/io/github/dfa1/vortex/reader/FlatSegmentDecoder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
/// Parses a flat segment from the memory-mapped file region and dispatches to the
1919
/// appropriate decoder via the {@link ReadRegistry}.
2020
///
21-
/// <p>Flat segment wire format:
21+
/// Flat segment wire format:
2222
/// {@code buffer_data... | FlatBuffer(Array) | u32 LE = FlatBuffer byte length}
2323
///
24-
/// <p>{@link ReadRegistry} is pure dispatch; this class owns all file-format knowledge:
24+
/// {@link ReadRegistry} is pure dispatch; this class owns all file-format knowledge:
2525
/// FlatBuffer parsing, buffer-offset arithmetic, and encoding-spec lookup.
2626
public final class FlatSegmentDecoder {
2727

reader/src/main/java/io/github/dfa1/vortex/reader/ReadRegistry.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
/// Read-side registry: maps {@link EncodingId} to {@link EncodingDecoder} implementations.
2020
///
21-
/// <p>Instances are immutable after construction. Build one via {@link #builder()} or
21+
/// Instances are immutable after construction. Build one via {@link #builder()} or
2222
/// via the {@link #loadAll()} and {@link #empty()} convenience factories.
2323
public final class ReadRegistry {
2424

@@ -169,7 +169,7 @@ public Builder registerServiceLoaded() {
169169

170170
/// Enable passthrough decode for unknown encoding ids.
171171
///
172-
/// <p>Default is strict: unknown ids throw {@link VortexException}. When enabled, unknown
172+
/// Default is strict: unknown ids throw {@link VortexException}. When enabled, unknown
173173
/// nodes are wrapped as {@link io.github.dfa1.vortex.reader.array.UnknownArray}.
174174
/// Mirrors Rust {@code VortexSession::allow_unknown()}.
175175
///

0 commit comments

Comments
 (0)