SONARJAVA-6840: Implement S9363: Invalid time-zone IDs should not silently fall back to GMT - #6009
Conversation
Detect invalid constant time-zone identifiers before TimeZone silently falls back to GMT, including Java-version-specific custom offset validation and safe literal quick fixes.
This comment has been minimized.
This comment has been minimized.
|
❌ Ruling needs updating. A fix PR has been created: #6011 Please review and merge it into your branch. |
Use the concise digit regex syntax required by S6353 and record the validated S9363 finding produced by the SonarQube server ruling project.
Code Review ✅ Approved 2 resolved / 2 findingsImplements rule S9363 to detect invalid compile-time constant time-zone IDs in TimeZone.getTimeZone with corresponding quick fixes and test coverage. No issues found. ✅ 2 resolved✅ Quality: Valid zone IDs depend on analyzer's JDK, not project's JDK
✅ Bug: test_without_semantic will fail: verifyIssues() with no issues raised
Implementation Status ✅ 1 / 1 issues implemented✅ SONARJAVA-6840 — 8 / 8 objectivesThe PR successfully implements the S9363 rule with validation, quick fixes, tests, and metadata. ✅ 8 complete
OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |
Ruling Diff SummaryDetected changes in 1 rule files: 0 issues removed, 1 issues added. S9363 (
|
|
|
I checked this directly in So Regarding the |




Summary
TimeZone.getTimeZone(String).Links
AI disclosure