Skip to content

1.6.0

Latest

Choose a tag to compare

@ethauvin ethauvin released this 12 Nov 17:56
· 4 commits to main since this release
e44a0a3

Summary

A hardening release that tightens nullability, I/O, process, and sandbox behavior while refining utility APIs across the library.

  • Refactored for clearer null/blank handling, robust I/O, and safer process execution.
  • Sandbox hardened: bounded zip extraction, symlink-aware hashing.
  • New Sandbox capabilities: silent flag and ZIP download with version-validated snapshot caching.
  • PathTools gains quoteArgForArgFile and accepts nullable subtype collections without JSpecify variance errors.
  • ProcessExecutor cleanup hardened: descendant snapshotting, NO_EXIT_CODE/hasExitCode(), race-free output capture, interrupt propagation, env validation, and configurable charset.
  • CollectionTools: no-arg overload ambiguity fixed, drop tracking deduped, and exceptions documented.
  • ObjectTools: fail-fast nesting depth, lazy suppliers, tightened require* contracts, and NaN/-0.0 sign fixes.
  • TextTools: unified whitespace definition and Object... overloads replaced with Iterable overloads.

What's Changed in 1.6.0

  • Refactor utility classes for clearer null/blank handling, more robust I/O and process execution, and update tests accordingly. in 66124ae
    • Harden IOTools: document NPE behavior, catch UncheckedIOException, handle InvalidPathException, and strip all leading slashes in path resolution.
    • Improve ObjectTools: use lazy NPE messages, resolve zero values through the superclass chain.
    • Refine ProcessExecutor validation/docs, defensive argument copying, nullable output consumer, and UncheckedIOException handling.
    • Update SystemTools Cygwin/MSYS2/WSL detection heuristics and null-safe checks.
    • Consolidate TextTools.require* guard logic into shared helpers with distinct null-element messages.
  • Harden Sandbox extraction, hashing and .gitignore detection in 8ccc65d
    • Bound zip extraction per buffer so a single oversized entry can't exhaust the disk
    • Hash symlinks as links (LINK:<target>) instead of following them
    • Match .gitignore entries per line with glob support (**, *, ?, [...], [!...], anchoring); ignore comments and negations
    • Document that root and subdirectory downloads for one extension must not be mixed
  • Add quoteArgForArgFile in PathTools in d5c33d5
  • Add silent flag to Sandbox in 3fa841e
  • Fix nullability @Contract in ObjectTools in 99ffc09
  • Add ZIP download and extraction with version-validated snapshot caching to Sandbox in 91c0182
  • Add SystemTools.javaExecutable() to resolve the running JVM's java binary` in 5952c26
  • Fix Cygwin/MinGW heuristic detection and consolidate WSL logic in SystemTools in 607cb08
    • isCygwin: match only explicit Cygwin markers (cygwin in SHELL/TERM, /cygdrive/ in PATH); drop bare /bin/ and /usr/bin/ shell prefixes and the non-signal /usr/bin/cygwin path token
    • isMinGw: match MSYSTEM case-insensitively and include UCRT*/CLANG* (MSYS2 environments)
    • isOtherOs(String): normalize osName once and pass to the is* helpers instead of re-normalizing per check
    • isWsl: remove redundant computeWsl; use isWsl(String, Supplier) as the single implementation backing the cached IS_WSL flag
  • Change PathTools to accept subtype collections of nullable elements without JSpecify variance errors in e468685
  • Harden ProcessExecutor cleanup. in 1ebc1cf
    • Snapshot descendants() before destroying the process tree.
    • Replace the -1 timeout sentinel with NO_EXIT_CODE and add hasExitCode()`.
    • Use CopyOnWriteArrayList for captured output to avoid a reader race.
    • Propagate InterruptedException from timeout cleanup instead of swallowing it.
    • Validate null keys/values in env(Map); make closeQuietly null-safe.
    • Add configurable charset(Charset), defaulting to UTF-8.
  • Fix no-arg overload ambiguity, dedupe drop tracking, document exceptions in CollectionTools in 7a41168
    • Add zero-arg overloads for the six collection/varargs method pairs so calls
    • like combineStringsToFiles() compile; literal null still needs a cast.
    • Document class-level runtime exceptions from path/file/string conversion.
    • Extract shared DropReason enum and logDropped helper; remove duplicated
    • booleans and the nested ternary in the varargs path.
    • Return List<@NonNull R> from internal helpers to reflect filtered nulls.
  • Clarify createDirs return, mkdirs InvalidPathException, resolveFile slash-stripping, varargs nullability, and findFilesByExtensions NPE asymmetry in IOTools in 3560a47
  • Fail fast on nesting depth, lazify suppliers, and tighten require contracts in ObjectTools in 936aaea
    • Throw IllegalStateException instead of logging a warning when
    • MAX_NESTING_DEPTH is exceeded
    • Make requireEmpty(value, Supplier) lazy like the other Supplier
    • overloads, and document the uniform supplier contract
    • Annotate require* value params @NonNull and align @Contract/null-checks
    • Fix NaN and -0.0 handling in sign checks
  • Unify whitespace definition and replace Object... overloads with Iterable in TextTools in 5b2bae1
    • Change WHITESPACE_PATTERN so
    • equalsIgnoreWhitespace matches isBlank's Character.isWhitespace
    • definition (e.g. EM SPACE, U+2003)
    • Replace the isBlank/isEmpty/isNotBlank/isNotEmpty Object... overloads
    • with Iterable overloads; drop the toString()
    • fallback for non-CharSequence inputs
    • Extract allMatch/noneMatch helpers shared by the array and iterable
    • overloads
  • Ignore .sandbox in lib/.gitignore in cd3583e

Full Changelog: 1.5.0...1.6.0