Skip to content

chore(internal): IntelliJ-guided cleanups + two arity repairs - #279

Merged
eschizoid merged 1 commit into
mainfrom
chore/intellij-cleanups
Jul 30, 2026
Merged

chore(internal): IntelliJ-guided cleanups + two arity repairs#279
eschizoid merged 1 commit into
mainfrom
chore/intellij-cleanups

Conversation

@eschizoid

Copy link
Copy Markdown
Owner

IDE-inspection cleanups (pattern-switch eachIterable, Leaf record conversion, ContainerView tidy) plus surgical repairs for the two inspections that removed load-bearing code: eachOptional's null guard (restored as requireNonNullElse) and throwConversion's arity-alignment param (kept the slimmer 3-arg handler; labelFailures rebinds at positions 1,2 — a legal empty-prefix catchException handler). Full suites green; the FoldLaws pins caught both breaks.

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.
@eschizoid
eschizoid merged commit d58cb08 into main Jul 30, 2026
3 checks passed
@eschizoid
eschizoid deleted the chore/intellij-cleanups branch July 30, 2026 23:40
@codecov

codecov Bot commented Jul 30, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.33333% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 79.79%. Comparing base (dcb30d9) to head (33a8c56).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
.../io/github/eschizoid/telescope/internal/MhIso.java 66.66% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant