Skip to content

fix: address SonarCloud reliability issues - #112

Merged
tomdesair merged 2 commits into
masterfrom
fix-sonarcloud-reliability-issues-1854060035614280304
Aug 2, 2026
Merged

fix: address SonarCloud reliability issues#112
tomdesair merged 2 commits into
masterfrom
fix-sonarcloud-reliability-issues-1854060035614280304

Conversation

@tomdesair

Copy link
Copy Markdown
Owner

This PR addresses three reliability issues identified by SonarCloud:

  1. Infinite Recursion in RequestHandler: The default process(5 args) method called the process(7 args) method, which in turn defaulted to calling the process(5 args) method. If neither was implemented, this would result in a StackOverflowError. The 5 args method was modified to throw an UnsupportedOperationException to break the cycle and enforce the use of the newer 7 args method.
  2. NullPointerException in RufhUploadExistsValidator: Added null checks for request and uploadStorageService at the start of the validate method. Previously, if they were null, Utils.isCreationEndpoint would return false, leading to a NPE when request.getRequestURI() was invoked.
  3. NullPointerException in DiskLockingService: Added a null check for lockPath in getStopPath. getPathInStorageDirectory can return null, which would cause an NPE when calling .resolveSibling() on it.

Tests and test coverage were updated to ensure everything passes and code changes are well-covered.


PR created automatically by Jules for task 1854060035614280304 started by @tomdesair

- Fix infinite recursion in `RequestHandler.process` (5 args) by throwing `UnsupportedOperationException`.
- Fix potential `NullPointerException` in `RufhUploadExistsValidator` when request or storage service is null.
- Fix potential `NullPointerException` in `DiskLockingService.getStopPath` when `getPathInStorageDirectory` returns null.

Co-authored-by: tomdesair <14034630+tomdesair@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

- Fix infinite recursion in `RequestHandler.process` (5 args) by throwing `UnsupportedOperationException`.
- Fix potential `NullPointerException` in `RufhUploadExistsValidator` when request or storage service is null.
- Fix potential `NullPointerException` in `DiskLockingService.getStopPath` when `getPathInStorageDirectory` returns null.

Co-authored-by: tomdesair <14034630+tomdesair@users.noreply.github.com>
@coveralls

coveralls commented Aug 2, 2026

Copy link
Copy Markdown

Coverage Status

coverage: 96.483% (-0.04%) from 96.519% — fix-sonarcloud-reliability-issues-1854060035614280304 into master

@tomdesair
tomdesair merged commit 370acb6 into master Aug 2, 2026
13 checks passed
@tomdesair
tomdesair deleted the fix-sonarcloud-reliability-issues-1854060035614280304 branch August 2, 2026 14:50
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