Skip to content

Add Builder.from() copy constructor to MantisJobClusterMetadataView#862

Merged
hellolittlej merged 1 commit into
masterfrom
add-builder
Jun 15, 2026
Merged

Add Builder.from() copy constructor to MantisJobClusterMetadataView#862
hellolittlej merged 1 commit into
masterfrom
add-builder

Conversation

@hellolittlej

Copy link
Copy Markdown
Collaborator

Context

  • Adds a static Builder.from(MantisJobClusterMetadataView) factory method to MantisJobClusterMetadataView.Builder that copies all fields from an existing instance
  • Enables creating modified copies of an immutable MantisJobClusterMetadataView without repeating all field assignments

WHY
MantisJobClusterMetadataView is fully immutable with no setters. When overlaying a field (e.g. jobPrincipal from a global store) onto an existing instance returned from Akka, callers previously had to manually copy all constructor arguments. The from() factory method eliminates this boilerplate and makes the pattern future-proof if new fields are added to the class.

Checklist

  • ./gradlew build compiles code correctly
  • Added new tests where applicable
  • ./gradlew test passes all tests
  • Extended README or added javadocs where applicable

@github-actions

github-actions Bot commented Jun 15, 2026

Copy link
Copy Markdown

Test Results

164 files  ±0  164 suites  ±0   10m 15s ⏱️ -55s
795 tests ±0  784 ✅ +1  11 💤 ±0  0 ❌  - 1 
795 runs   - 1  784 ✅ ±0  11 💤 ±0  0 ❌  - 1 

Results for commit fbbe49f. ± Comparison against base commit 254c035.

♻️ This comment has been updated with latest results.

@hellolittlej hellolittlej merged commit 0ec2673 into master Jun 15, 2026
5 checks passed
@hellolittlej hellolittlej deleted the add-builder branch June 15, 2026 21:53
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.

2 participants