The GitHub Actions job "Build" on jackrabbit-oak.git/OAK-12402 has failed.
Run started by GitHub user lweitzendorf (triggered by lweitzendorf).

Head commit for run:
629462c660f992e03cee9d24adca03262f6275ed / Lucas Weitzendorf 
<[email protected]>
OAK-12402: Add allocation-free primitive checkArgument overload to Validate

Validate.checkArgument(boolean, String, Object...) boxes its argument and
allocates a varargs Object[] on every call, even when the check passes.
ListRecord's constructor validates its size with this varargs overload on the
hot record-navigation path (every multi-value / multi-segment / large-string
read), boxing an int and allocating an Object[] per construction. Profiling a
segment-store traversal (JFR settings=profile) showed Integer.valueOf at ~3.3%
of on-CPU samples, all from ListRecord.<init>.

Add a single primitive long checkArgument overload. Every integral primitive
(byte/short/char/int/long) binds to it via primitive widening with no boxing,
so callers like ListRecord.<init> bind automatically with no source change and
no per-call allocation. The overload keeps the allocation-free path inline and
delegates the failure / template-diagnostic path to the varargs overload,
preserving its contract (messageTemplate null-check, checkTemplate diagnostic).

Package version bumped 1.0.0 -> 1.1.0 for the backward-compatible addition.

Report URL: https://github.com/apache/jackrabbit-oak/actions/runs/35603606883

With regards,
GitHub Actions via GitBox

Reply via email to