chore(internal): IntelliJ-guided cleanups + two arity repairs - #279
Merged
Conversation
Style cleanups from IDE inspections: eachIterable.modify rewritten as a null-tolerant pattern switch, MhIso.Leaf converted from a hand-rolled class to a record (accessors and ctor generated), and ContainerView tidied. Two of the inspections removed code that looked dead but was load-bearing; repaired without undoing the cleanups: - eachOptional's getter lost its null guard (a null Optional FIELD must focus nothing — the documented container contract, pinned by FoldLaws). Restored as Objects.requireNonNullElse, which the inspection accepts. - throwConversion's "unused" Object parameter existed to align catch-handler arity for MethodHandles.catchException. The slimmer 3-arg handler is kept: labelFailures now binds from/to at positions 1,2, leaving a legal (Throwable) -> Object handler with an empty target-param prefix; the handler javadoc describes the new shape. Full :core and :internal suites green.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #279 +/- ##
=========================================
Coverage 79.79% 79.79%
+ Complexity 2046 2045 -1
=========================================
Files 91 91
Lines 6492 6484 -8
Branches 1330 1328 -2
=========================================
- Hits 5180 5174 -6
+ Misses 770 768 -2
Partials 542 542 ☔ View full report in Codecov by Harness. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
IDE-inspection cleanups (pattern-switch
eachIterable,Leafrecord conversion,ContainerViewtidy) plus surgical repairs for the two inspections that removed load-bearing code:eachOptional's null guard (restored asrequireNonNullElse) andthrowConversion's arity-alignment param (kept the slimmer 3-arg handler;labelFailuresrebinds at positions 1,2 — a legal empty-prefixcatchExceptionhandler). Full suites green; the FoldLaws pins caught both breaks.