Expected Behavior
toSeconds() accounts for seconds and nanos, unlike getSeconds(). This is confirmed by AI Overview (screenshot below).
Actual Behavior
toSeconds() is implemented by return seconds; all the way to JDK 25. Hence, getSeconds() and toSeconds() return identical result. The way the rule is phrased may lead the user to believe these results are different and cause errors when a "conversion" is attempted.
Screenshot
Interestingly, this AI Overview seems to be using the JavaDurationGetSecondsToToSeconds rule text to generate the advice, thus possibly creating a circular hallucination.
