Repository navigation
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.
Sandboxhardened: bounded zip extraction, symlink-aware hashing.- New
Sandboxcapabilities: silent flag and ZIP download with version-validated snapshot caching. PathToolsgainsquoteArgForArgFileand accepts nullable subtype collections without JSpecify variance errors.ProcessExecutorcleanup 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, tightenedrequire*contracts, and NaN/-0.0 sign fixes.TextTools: unified whitespace definition andObject...overloads replaced withIterableoverloads.
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, catchUncheckedIOException, handleInvalidPathException, and strip all leading slashes in path resolution. - Improve
ObjectTools: use lazy NPE messages, resolve zero values through the superclass chain. - Refine
ProcessExecutorvalidation/docs, defensive argument copying, nullable output consumer, andUncheckedIOExceptionhandling. - Update
SystemToolsCygwin/MSYS2/WSL detection heuristics and null-safe checks. - Consolidate
TextTools.require*guard logic into shared helpers with distinct null-element messages.
- Harden
- 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
.gitignoreentries per line with glob support (**,*,?,[...],[!...], anchoring); ignore comments and negations - Document that root and subdirectory downloads for one extension must not be mixed
- Add
quoteArgForArgFilein PathTools in d5c33d5 - Add silent flag to Sandbox in 3fa841e
- Fix nullability
@Contractin 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 (cygwininSHELL/TERM,/cygdrive/inPATH); drop bare/bin/and/usr/bin/shell prefixes and the non-signal/usr/bin/cygwinpath tokenisMinGw: matchMSYSTEMcase-insensitively and includeUCRT*/CLANG*(MSYS2 environments)isOtherOs(String): normalizeosNameonce and pass to theis*helpers instead of re-normalizing per checkisWsl: remove redundantcomputeWsl; useisWsl(String, Supplier)as the single implementation backing the cachedIS_WSLflag
- 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_CODEand add hasExitCode()`. - Use
CopyOnWriteArrayListfor captured output to avoid a reader race. - Propagate
InterruptedExceptionfrom timeout cleanup instead of swallowing it. - Validate null keys/values in env(Map); make
closeQuietlynull-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
DropReasonenum andlogDroppedhelper; 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
IllegalStateExceptioninstead of logging a warning when MAX_NESTING_DEPTHis exceeded- Make
requireEmpty(value, Supplier)lazy like the other Supplier - overloads, and document the uniform supplier contract
- Annotate require* value params
@NonNulland align@Contract/null-checks - Fix NaN and -0.0 handling in sign checks
- Throw
- Unify whitespace definition and replace Object... overloads with Iterable in TextTools in 5b2bae1
- Change
WHITESPACE_PATTERNso equalsIgnoreWhitespacematches isBlank'sCharacter.isWhitespace- definition (e.g. EM SPACE, U+2003)
- Replace the
isBlank/isEmpty/isNotBlank/isNotEmptyObject...overloads - with Iterable overloads; drop the
toString() - fallback for non-CharSequence inputs
- Extract
allMatch/noneMatchhelpers shared by the array and iterable - overloads
- Change
- Ignore
.sandboxinlib/.gitignorein cd3583e
Full Changelog: 1.5.0...1.6.0