File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -304,9 +304,9 @@ Auto-fix boundaries:
304304- Never change:
305305 - literal type suffixes (e.g., ` 200 ` → ` 200L ` or vice-versa) — Java widens
306306 automatically; both forms compile identically and the change is noise
307- - non-capturing lambdas or method references as unnecessary allocations ; do not flag or
308- fix these, because on modern JDKs these are typically cached at the call site rather
309- than allocated on every invocation
307+ - non-capturing lambdas or method references as allocation issues ; do not flag,
308+ fix, or justify changes to these as per-call allocations. On HotSpot /
309+ OpenJDK 8+, these are cached at the call site.
310310
311311Output content rules:
312312
Original file line number Diff line number Diff line change @@ -91,9 +91,8 @@ For each file in scope:
9191 - PR mode: changed lines only
9292 - File/directory mode: all lines
93934 . Apply checklist rules (below) and insert comments above offending lines.
94- 5 . Do not flag a non-capturing lambda or method reference as an unnecessary allocation,
95- because on modern JDKs these are typically cached at the call site rather than
96- allocated on every invocation.
94+ 5 . Do not flag a non-capturing lambda or method reference as an allocation issue.
95+ On HotSpot / OpenJDK 8+, these are cached at the call site.
97966 . Flag a missing version-boundary comment on a single-class ` hasClassesNamed(...) `
9897 check in ` classLoaderMatcher() ` only after validating the stated boundary from
9998 repository or upstream evidence. Use ` // added in X.Y ` for a pure lower bound.
Original file line number Diff line number Diff line change @@ -75,6 +75,8 @@ Read and apply `docs/contributing/style-guide.md`.
7575Do not flag the following patterns (common false positives):
7676
7777- FQCN is acceptable when class-name collision makes import impossible.
78+ - Do not claim that a Java non-capturing lambda or method reference allocates per
79+ call. On HotSpot / OpenJDK 8+, these are cached at the call site.
7880
7981## [ Style] Visibility modifiers
8082
You can’t perform that action at this time.
0 commit comments