Repository navigation
#59 extract field helper in RtTransaction - #129
Merged
Merged
Conversation
Replace seven inline copies of the split-and-pick block with a single private field(int) helper that returns the raw value at the given index of the semicolon-separated transaction string.
bibonix
approved these changes
Jun 14, 2026
bibonix
left a comment
Contributor
There was a problem hiding this comment.
Approving. Pure extraction of seven duplicated split-and-pick blocks into one private field(int) helper with no behavior change. The seven-field guard in the constructor keeps ItemAt safe for indices 0 through 6. Existing tests cover every public accessor and CI is green across the matrix. No inline comments.
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.
The seven field accessors in
RtTransaction(id,time,amount,prefix,bnf,details,signature) each contained an inline copy of the same six-line split-and-pick block that wrappedItemAtandSplitinIoCheckedandUncheckedText. This change extracts that block into a single privatefield(int)helper and rewrites the seven call sites to use it. The class also gains@SuppressWarnings("PMD.TooManyMethods")because adding the helper pushes the method count past the PMD threshold; the existing class was already at the limit before the refactor.No public behavior changes. The 35 tests in
RtTransactionTeststill pass against the new implementation, and the full qulice pass runs clean.Checks run locally on this branch:
mvn --batch-mode -Pqulice clean install— BUILD SUCCESS; 68 tests run, 0 failures, 0 errors, 5 skipped (skip set unchanged from master).Closes #59