On Fri, 4 Mar 2022 05:02:37 GMT, Naoto Sato <na...@openjdk.org> wrote:

>> Supporting `IsoFields` temporal fields in chronologies that are similar to 
>> ISO chronology. Corresponding CSR has also been drafted.
>
> Naoto Sato has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   copyright year fix

src/java.base/share/classes/java/time/chrono/Chronology.java line 792:

> 790:      * @since 19
> 791:      */
> 792:     default boolean isIsoLike() {

Maybe a bit late for a name change...

How about the method name being:  `supportsIsoFields()`.

IsoLike seem pretty wishy washy.

src/java.base/share/classes/java/time/chrono/IsoChronology.java line 682:

> 680:     
> //-----------------------------------------------------------------------
> 681:     /**
> 682:      * {@inheritDoc}

I would rather see the statement indicating that ISOChronology returns true; 
not a generic sentence.
(For each of the Chronologies).

"IsoChronology supports ISO based fields, such as DAY_OF_QUARTER and 
QUARTER_OF_YEAR."

src/java.base/share/classes/java/time/temporal/IsoFields.java line 599:

> 597:         private static void ensureIsoLike(TemporalAccessor temporal) {
> 598:             if (!isIsoLike(temporal)) {
> 599:                 throw new DateTimeException("Resolve requires ISO-like 
> Chronology");

Would the exception be easier to debug with if it mentioned the chronology that 
is not ISO-like?

test/jdk/java/time/test/java/time/temporal/TestIsoWeekFields.java line 132:

> 130:     public void test_Unit_isSupportedBy_ISO() {
> 131:         
> assertEquals(IsoFields.WEEK_BASED_YEARS.isSupportedBy(LocalDate.now()),true);
> 132:         
> assertEquals(IsoFields.WEEK_BASED_YEARS.isSupportedBy(ThaiBuddhistDate.now()),true);

Typically, comma (",") is followed by space.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7683

Reply via email to