Add LocalDateRange.withEndInclusive(TemporalAdjuster) - #383
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthrough
ChangesLocalDateRange inclusive-end adjustment
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant Caller
participant LocalDateRange
participant TemporalAdjuster
Caller->>LocalDateRange: withEndInclusive(adjuster)
LocalDateRange->>LocalDateRange: getEndInclusive()
LocalDateRange->>TemporalAdjuster: adjust inclusive end date
TemporalAdjuster-->>LocalDateRange: adjusted end date
LocalDateRange->>LocalDateRange: ofClosed(start, adjusted end)
LocalDateRange-->>Caller: new LocalDateRange
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR adds an API to adjust LocalDateRange based on its inclusive end date, extending the range-manipulation capabilities alongside existing withStart(...) and withEnd(...) adjuster methods.
Changes:
- Add
LocalDateRange.withEndInclusive(TemporalAdjuster)and associated tests. - Add validation test coverage for
LocalDateRange.ofClosed(...)rejecting end-before-start. - Update changelog and refine related Javadoc.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/main/java/org/threeten/extra/LocalDateRange.java | Adds withEndInclusive(TemporalAdjuster) and updates/clarifies Javadocs. |
| src/test/java/org/threeten/extra/TestLocalDateRange.java | Adds unit tests for withEndInclusive(...) and for invalid ofClosed(...) inputs. |
| src/changes/changes.xml | Records the new API in the 1.11.0 changelog. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Allows a range to be adjusted based on the inclusive end date. Fixes #371
bdccf51 to
57fab26
Compare
|
@coderabbitai review |
✅ Action performedReview finished.
|
Allows a range to be adjusted based on the inclusive end date.
Fixes #371
Summary by CodeRabbit