Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cli/src/main/java/io/github/dfa1/vortex/cli/CliHandles.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

/// Shared handle plumbing for the interactive subcommands (`view`, `tui`).
///
/// A {@link VortexReader} uses a confined {@link java.lang.foreign.Arena}, so the file must be
/// A [VortexReader] uses a confined [java.lang.foreign.Arena], so the file must be
/// opened and closed on the same {@link IoWorker} thread the TUI later dispatches I/O to. These
/// helpers centralise that worker round-trip plus the local-file / http(s) target resolution.
@SuppressWarnings("java:S106") // CLI tool: user-facing diagnostics go to System.err by design.
Expand Down Expand Up @@ -55,7 +55,7 @@ static Optional<VortexHandle> openOnWorker(IoWorker worker, String target)
static void closeOnWorker(IoWorker worker, VortexHandle handle) {
try {
worker.runAndAwait(handle::close);
} catch (InterruptedException e) {
} catch (InterruptedException _) {
Thread.currentThread().interrupt();
}
}
Expand Down Expand Up @@ -84,7 +84,7 @@ private static VortexHandle open(String target) throws IOException {
if (target.startsWith("http://") || target.startsWith("https://")) {
try {
return VortexHttpReader.open(new URI(target));
} catch (URISyntaxException e) {
} catch (URISyntaxException _) {
System.err.println("invalid URL: " + target);
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,11 @@ private static IllegalArgumentException invalid(String expr) {
private static Comparable<?> parseValue(String raw) {
try {
return Long.parseLong(raw);
} catch (NumberFormatException ignored) {
} catch (NumberFormatException _) {
}
try {
return Double.parseDouble(raw);
} catch (NumberFormatException ignored) {
} catch (NumberFormatException _) {
}
if ("true".equalsIgnoreCase(raw)) {
return Boolean.TRUE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ private static VortexHandle open(String target) throws IOException {
if (target.startsWith("http://") || target.startsWith("https://")) {
try {
return VortexHttpReader.open(new URI(target));
} catch (URISyntaxException e) {
} catch (URISyntaxException _) {
System.err.println("invalid URL: " + target);
return null;
}
Expand Down
2 changes: 1 addition & 1 deletion cli/src/main/java/io/github/dfa1/vortex/cli/VortexCli.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

/// Entry point for the Vortex command-line tool.
///
/// Exit codes: see {@link ExitStatus}.
/// Exit codes: see [ExitStatus].
public final class VortexCli {

static {
Expand Down
6 changes: 3 additions & 3 deletions cli/src/main/java/io/github/dfa1/vortex/cli/tui/IoWorker.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.atomic.AtomicInteger;

/// Single-threaded I/O executor that owns one {@link io.github.dfa1.vortex.reader.VortexHandle}.
/// Single-threaded I/O executor that owns one [io.github.dfa1.vortex.reader.VortexHandle].
///
/// Vortex readers use a confined {@link java.lang.foreign.Arena}, so every
/// `slice()` / `scan()` call must happen on the same thread that
Expand Down Expand Up @@ -88,13 +88,13 @@ private void loop() {
Runnable task;
try {
task = queue.take();
} catch (InterruptedException e) {
} catch (InterruptedException _) {
Thread.currentThread().interrupt();
return;
}
try {
task.run();
} catch (RuntimeException ignored) {
} catch (RuntimeException _) {
// Task is expected to capture its own failures into shared state.
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public static void show(VortexHandle handle, InspectorTree.Progress progress) th
}

/// Variant that dispatches every `handle` I/O call onto the supplied
/// {@link IoWorker}. Required when the handle was opened on a different
/// [IoWorker]. Required when the handle was opened on a different
/// thread (Vortex readers use a confined {@link java.lang.foreign.Arena},
/// so cross-thread access throws `WrongThreadException`).
///
Expand Down Expand Up @@ -166,7 +166,7 @@ private void indexStatsChildrenOnWorker(InspectorTree.Node root) {
}
try {
worker.runAndAwait(() -> indexStatsChildren(root));
} catch (InterruptedException e) {
} catch (InterruptedException _) {
Thread.currentThread().interrupt();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public Size size() {
if (rc != 0) {
return new Size(24, 80);
}
} catch (Throwable t) {
} catch (Throwable _) {
return new Size(24, 80);
}
int rows = Short.toUnsignedInt(ws.get(ValueLayout.JAVA_SHORT, 0));
Expand Down Expand Up @@ -143,7 +143,7 @@ public void close() {
closed = true;
try {
Runtime.getRuntime().removeShutdownHook(shutdownHook);
} catch (IllegalStateException ignored) {
} catch (IllegalStateException _) {
// JVM already shutting down.
}
restore();
Expand All @@ -158,7 +158,7 @@ private void restore() {
out.flush();
@SuppressWarnings("unused")
int rc = (int) TCSETATTR.invokeExact(STDIN_FD, TCSANOW, savedTermios);
} catch (Throwable ignored) {
} catch (Throwable _) {
// Best-effort: JVM is exiting; nothing useful to do.
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public Size size() {
if (rc == 0) {
return new Size(24, 80);
}
} catch (Throwable t) {
} catch (Throwable _) {
return new Size(24, 80);
}
int left = info.get(ValueLayout.JAVA_SHORT, 10);
Expand Down Expand Up @@ -179,7 +179,7 @@ public void close() {
closed = true;
try {
Runtime.getRuntime().removeShutdownHook(shutdownHook);
} catch (IllegalStateException ignored) {
} catch (IllegalStateException _) {
// JVM already shutting down.
}
restore();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/// Smoke test for the FFM-based POSIX terminal binding.
///
/// Runs only on Linux / macOS (other OSes lack the libc entry points). Mirrors
/// {@link WindowsTerminalSmokeTest}: the goal is to catch missing-symbol /
/// [WindowsTerminalSmokeTest]: the goal is to catch missing-symbol /
/// signature-mismatch regressions in CI without requiring a real interactive TTY.
///
/// `open()` and `size()` are deliberately not exercised — they need a real
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
///
/// - Class load alone forces every `Linker.downcallHandle` to resolve
/// its kernel32 symbol. A missing entry point throws
/// {@link UnsatisfiedLinkError} during static initialization.
/// [UnsatisfiedLinkError] during static initialization.
/// - Bit-flag math for the VT mode toggles is verified directly so a typo
/// in a constant fails here, not in a customer's terminal.
class WindowsTerminalSmokeTest {
Expand Down
50 changes: 25 additions & 25 deletions core/src/main/java/io/github/dfa1/vortex/core/DType.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public sealed interface DType
boolean nullable();

/// Returns a copy of this type marked nullable. Sugar over
/// {@link #withNullable(boolean)} so call sites read as a fluent adjective:
/// [#withNullable(boolean)] so call sites read as a fluent adjective:
/// `DType.i64().asNullable()`.
///
/// @return a new {@link DType} identical to this one but with `nullable = true`
Expand All @@ -36,7 +36,7 @@ default DType asNullable() {
/// Returns a copy of this type with the given nullability.
///
/// @param nullable the desired nullability for the returned type
/// @return a new {@link DType} identical to this one except for its nullability
/// @return a new [DType] identical to this one except for its nullability
default DType withNullable(boolean nullable) {
return switch (this) {
case Null _ -> new Null(nullable);
Expand All @@ -59,94 +59,94 @@ default DType withNullable(boolean nullable) {
// [#nullable()] for nullable columns. The underlying records are unchanged
// and remain usable directly (pattern matching, proto serialization, tests).

/// @return non-nullable {@link Bool}
/// @return non-nullable [Bool]
static Bool bool_() {
return new Bool(false);
}

/// @return non-nullable {@link Utf8}
/// @return non-nullable [Utf8]
static Utf8 utf8() {
return new Utf8(false);
}

/// @return non-nullable {@link Binary}
/// @return non-nullable [Binary]
static Binary binary() {
return new Binary(false);
}

/// @return non-nullable {@link Null}
/// @return non-nullable [Null]
static Null null_() {
return new Null(false);
}

/// @return non-nullable {@link Variant}
/// @return non-nullable [Variant]
static Variant variant() {
return new Variant(false);
}

/// @return non-nullable {@link Primitive} of {@link PType#I8}
/// @return non-nullable [Primitive] of [PType#I8]
static Primitive i8() {
return new Primitive(PType.I8, false);
}

/// @return non-nullable {@link Primitive} of {@link PType#I16}
/// @return non-nullable [Primitive] of [PType#I16]
static Primitive i16() {
return new Primitive(PType.I16, false);
}

/// @return non-nullable {@link Primitive} of {@link PType#I32}
/// @return non-nullable [Primitive] of [PType#I32]
static Primitive i32() {
return new Primitive(PType.I32, false);
}

/// @return non-nullable {@link Primitive} of {@link PType#I64}
/// @return non-nullable [Primitive] of [PType#I64]
static Primitive i64() {
return new Primitive(PType.I64, false);
}

/// @return non-nullable {@link Primitive} of {@link PType#U8}
/// @return non-nullable [Primitive] of [PType#U8]
static Primitive u8() {
return new Primitive(PType.U8, false);
}

/// @return non-nullable {@link Primitive} of {@link PType#U16}
/// @return non-nullable [Primitive] of [PType#U16]
static Primitive u16() {
return new Primitive(PType.U16, false);
}

/// @return non-nullable {@link Primitive} of {@link PType#U32}
/// @return non-nullable [Primitive] of [PType#U32]
static Primitive u32() {
return new Primitive(PType.U32, false);
}

/// @return non-nullable {@link Primitive} of {@link PType#U64}
/// @return non-nullable [Primitive] of [PType#U64]
static Primitive u64() {
return new Primitive(PType.U64, false);
}

/// @return non-nullable {@link Primitive} of {@link PType#F16}
/// @return non-nullable [Primitive] of [PType#F16]
static Primitive f16() {
return new Primitive(PType.F16, false);
}

/// @return non-nullable {@link Primitive} of {@link PType#F32}
/// @return non-nullable [Primitive] of [PType#F32]
static Primitive f32() {
return new Primitive(PType.F32, false);
}

/// @return non-nullable {@link Primitive} of {@link PType#F64}
/// @return non-nullable [Primitive] of [PType#F64]
static Primitive f64() {
return new Primitive(PType.F64, false);
}

/// @param precision total number of significant decimal digits
/// @param scale number of digits to the right of the decimal point
/// @return non-nullable {@link Decimal}
/// @return non-nullable [Decimal]
static Decimal decimal(int precision, int scale) {
return new Decimal((byte) precision, (byte) scale, false);
}

/// Returns a fresh {@link StructBuilder} for assembling a {@link Struct} dtype with
/// Returns a fresh [StructBuilder] for assembling a [Struct] dtype with
/// name+type pairs declared together at the call site.
///
/// ```java
Expand All @@ -163,7 +163,7 @@ static StructBuilder structBuilder() {
return new StructBuilder();
}

/// Fluent builder for {@link Struct} dtypes. Use {@link #structBuilder()} to obtain one.
/// Fluent builder for [Struct] dtypes. Use [#structBuilder()] to obtain one.
/// Preserves insertion order and rejects duplicate field names at {@link #build()}.
final class StructBuilder {
private final LinkedHashMap<String, DType> fields = new LinkedHashMap<>();
Expand Down Expand Up @@ -193,7 +193,7 @@ public StructBuilder asNullable() {
return this;
}

/// Builds the {@link Struct} dtype.
/// Builds the [Struct] dtype.
///
/// @return a new {@link Struct} reflecting every field added so far
public Struct build() {
Expand All @@ -218,7 +218,7 @@ record Null(boolean nullable) implements DType {
record Bool(boolean nullable) implements DType {
}

/// Primitive numeric logical type backed by a physical {@link PType}.
/// Primitive numeric logical type backed by a physical [PType].
///
/// @param ptype physical primitive type (e.g. I32, F64)
/// @param nullable whether null values are permitted
Expand Down Expand Up @@ -258,7 +258,7 @@ record Struct(
/// Returns the type of the field with the given name.
///
/// @param name the field name to look up
/// @return the {@link DType} of the named field
/// @return the [DType] of the named field
/// @throws IllegalArgumentException if no field with that name exists
public DType field(String name) {
int i = fieldNames.indexOf(name);
Expand Down Expand Up @@ -304,7 +304,7 @@ record Extension(
public static final int MAX_METADATA_SIZE = 64 * 1024;

/// @throws VortexException if `metadata` carries more than
/// {@link #MAX_METADATA_SIZE} readable bytes
/// [#MAX_METADATA_SIZE] readable bytes
public Extension {
if (metadata != null && metadata.remaining() > MAX_METADATA_SIZE) {
throw new VortexException("extension metadata too large: "
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/io/github/dfa1/vortex/core/PType.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public boolean isSigned() {
|| this == F16 || this == F32 || this == F64;
}

/// Returns the {@link PType} for the given enum ordinal — the integer value the wire format
/// Returns the [PType] for the given enum ordinal — the integer value the wire format
/// uses to identify a physical type.
///
/// Unlike `PType.values()[ordinal]`, this method validates the ordinal against the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
/// do not retry on the same input. The correct response is to abort the read, surface the error,
/// and close the `VortexFile`.
///
/// Carries an optional {@link EncodingId} for diagnostic attribution; it is not intended
/// Carries an optional [EncodingId] for diagnostic attribution; it is not intended
/// for recovery logic.
public final class VortexException extends RuntimeException {

Expand Down Expand Up @@ -60,7 +60,7 @@ private static String prefix(EncodingId encodingId) {

/// Returns the encoding that raised this exception, if known.
///
/// @return an {@link Optional} containing the {@link EncodingId}, or empty if not attributed
/// @return an [Optional] containing the [EncodingId], or empty if not attributed
public Optional<EncodingId> encodingId() {
return Optional.ofNullable(encodingId);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public static TimeUnit fromTag(byte tag) {
}

/// Returns the number of this time unit's divisions in one second (e.g. 1_000_000_000 for nanoseconds).
/// Throws {@link IllegalArgumentException} for {@link #Days}.
/// Throws [IllegalArgumentException] for [#Days].
///
/// @return divisor for converting between this unit and seconds
public long divisor() {
Expand Down
Loading