On Wed, 10 Jun 2026 17:41:36 GMT, Naoto Sato <[email protected]> wrote:
>> Simple example fix in the javadoc. >> >> --------- >> - [x] I confirm that I make this contribution in accordance with the >> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). > > Naoto Sato has updated the pull request incrementally with one additional > commit since the last revision: > > more example corrections Some minor comments mostly on consistency. src/java.base/share/classes/java/time/temporal/TemporalAmount.java line 150: > 148: * dateTime = dateTime.plus(adder); > 149: * </pre> > 150: * It is recommended to use the second approach, {@code > plus(TemporalAmount)}, I thought the original intent was to display the method signature type rather than the actual amount variable. That said, either way works. src/java.base/share/classes/java/time/temporal/TemporalField.java line 192: > 190: * supported = temporal.isSupported(thisField); > 191: * </pre> > 192: * It is recommended to use the second approach, {@code > isSupported(TemporalField)}, As in my other comment, this line here keeps the type and does not replace it with the var. But I see both forms in this PR, so picking one to follow is probably ideal. src/java.base/share/classes/java/time/temporal/TemporalField.java line 287: > 285: * temporal = temporal.with(thisField, newValue); > 286: * </pre> > 287: * It is recommended to use the second approach, {@code > with(TemporalField, newValue)}, One param is the type but the other is the var name. Probably better to follow the format from above, `{@code with(TemporalField, long)}`. Applies to the other occurrences. ------------- PR Review: https://git.openjdk.org/jdk/pull/31464#pullrequestreview-4471306112 PR Review Comment: https://git.openjdk.org/jdk/pull/31464#discussion_r3391268928 PR Review Comment: https://git.openjdk.org/jdk/pull/31464#discussion_r3391278122 PR Review Comment: https://git.openjdk.org/jdk/pull/31464#discussion_r3391287435
