SONARJAVA-6778: Implement S9393: "Duration.get()" should only be called with SECONDS or NANOS - #6138
Conversation
…d with SECONDS or NANOS
…emporalUnit enums
Code Review ✅ Approved 2 resolved / 2 findingsImplements rule S9393 to detect invalid ✅ 2 resolved✅ Bug: Custom TemporalUnit exemption rests on a false JDK claim
✅ Quality: Message/fix guidance not extended to custom TemporalUnit enums
Review coverageFunctional validation 1 of 1 objectives covered Implementation Status ✅ 1 of 1 objectives covered✅ SONARJAVA-6778 - 1 of 1 objectives coveredThis PR implements rule S9393 to detect when Duration.get() is called with unsupported temporal units. ✅ 1 covered here
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 |
|




Summary
"Duration.get()"should only be called withSECONDSorNANOS.DurationGetTemporalUnitCheck, accompanying tests, and test samples.Sonar_wayquality profile.Links
AI disclosure