Repository navigation
Report a mask request with no component or a bad ID - #58
Merged
Merged
Conversation
A mask request with no componentId[] parameter replied "NullPointerException" and was logged at SEVERE, because SaveMaskingRequest looped over the null parameter array before the facade could report "No component selected". An empty or non-number ID replied IllegalArgumentException or NumberFormatException the same way. Treat a missing parameter as no component, so the facade's message is returned, and report empty or non-number IDs as user errors. The reply leaves the bad value out, since it is echoed into the XML unescaped. MaskingRequestIT now checks both replies. Fixes #52 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Fixes #52
What changed
SaveMaskingRequesttreats a missingcomponentId[]parameter as no component, so the facade's "No component selected" reply comes back instead ofNullPointerException(logged at SEVERE).IllegalArgumentException/NumberFormatException.MaskingRequestITgainsrequestNeedsComponentandrequestNeedsNumericComponentId; its request helper can send any list of IDs, including none.No deployment steps; no schema or settings change.
Checks
./gradlew build: passed (spotless and unit tests)../gradlew integrationTest --tests org.jlab.srm.MaskingRequestITagainst the app without the fix: the two new tests failed, replyingNullPointerExceptionandNumberFormatException; the other 7 passed../gradlew integrationTestpassed in full (MaskingRequestITandPagesIT). The app log shows the two requests as WARNING "Application Exception" and no SEVERE "Unable to create masking request".Decisions
Prepared-by: Anthropic Claude Code:claude-opus-5-5
🤖 Generated with Claude Code