You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9a37dc3
Browse filesBrowse the repository at this point in the historyBrowse files
Refactored the Message class in the spec module from a final class to a
Java record to reduce boilerplate code and leverage modern Java features.
Key changes:
- Converted Message to record with compact canonical constructor
- Preserved validation and defensive copying logic
- Added deprecated getter methods for backward compatibility
- Updated Builder to use record accessor methods
- Removed setTaskId() and setContextId() setters (use builder for immutability)
Benefits:
- Automatic equals(), hashCode(), and toString() implementations
- Improved code readability and maintainability
- Zero breaking changes for getter methods (deprecated methods maintain API compatibility)
Breaking change note: This is marked as breaking because:
1. The underlying class structure changed from a class to a record
2. The setTaskId() and setContextId() methods were removed (records are immutable)
See ADR 0002 (doc/adr/0002-refactor-domain-classes-to-java-records.md) for
detailed architectural decision and rationale.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
0 commit comments