Skip to content

SONARJAVA-6704 Implement new rule S9132 - #5859

Draft
romainbrenguier wants to merge 1 commit into
masterfrom
new-rule/SONARJAVA-6704-S9132
Draft

SONARJAVA-6704 Implement new rule S9132#5859
romainbrenguier wants to merge 1 commit into
masterfrom
new-rule/SONARJAVA-6704-S9132

Conversation

@romainbrenguier

Copy link
Copy Markdown
Contributor

Detect calls to setMaximumPoolSize() on ScheduledThreadPoolExecutor instances. This method has no effect because ScheduledThreadPoolExecutor uses a fixed-size pool determined solely by corePoolSize.

Part of

@hashicorp-vault-sonar-prod

hashicorp-vault-sonar-prod Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

SONARJAVA-6704

@romainbrenguier
romainbrenguier force-pushed the new-rule/SONARJAVA-6704-S9132 branch from 09e6cf8 to d4a7231 Compare August 3, 2026 08:16
Detect calls to setMaximumPoolSize() on ScheduledThreadPoolExecutor
instances. This method has no effect because ScheduledThreadPoolExecutor
uses a fixed-size pool determined solely by corePoolSize.
@romainbrenguier
romainbrenguier force-pushed the new-rule/SONARJAVA-6704-S9132 branch from d4a7231 to b145d55 Compare August 3, 2026 08:27
@gitar-bot

gitar-bot Bot commented Aug 3, 2026

Copy link
Copy Markdown
CI failed: Test failures occurred in the java-checks module due to a quickfix mismatch in ScheduledThreadPoolExecutorMaximumPoolSizeCheckTest introduced by the new rule S9132.

Overview

Unique test failures were found across 2 CI log files in the java-checks module during Maven surefire test execution, directly related to the new rule S9132 implementation.

Failures

Test Failures in java-checks Module (confidence: high)

  • Type: test
  • Affected jobs: 91632472456, 91634742307
  • Related to change: yes
  • Root cause: ScheduledThreadPoolExecutorMaximumPoolSizeCheckTest failed due to a discrepancy between expected and raised quickfixes in ScheduledThreadPoolExecutorMaximumPoolSizeCheckSample.java (line 39), and general test execution issues during the build.
  • Suggested fix: Inspect ScheduledThreadPoolExecutorMaximumPoolSizeCheckTest.java, its sample file around line 39, and ensure rule S9132 quickfix assertions are correctly configured and implemented.

Summary

  • Change-related failures: 2 job failures involving unit test failures in the java-checks module.
  • Infrastructure/flaky failures: 0
  • Recommended action: Review the test assertions and quickfix expectations for rule S9132 in the java-checks module and fix the failing tests.
Code Review ✅ Approved

Implements new SonarJava rule S9132 to detect ineffective calls to setMaximumPoolSize() on ScheduledThreadPoolExecutor instances. No issues found.

Tip

Comment Gitar fix CI or enable auto-apply: gitar auto-apply:on

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

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.

1 participant