What is the motivation for two different week-based-year definitions in JSR-310?

This is a bug in IsoFields which managed to slip through because this method was untested (sorry about that). There should be very little observable difference between IsoFields and WeekFields.ISO when implemented correctly.

See the bug report and patch which will eventually work through the system and be fixed.

Note, testing revealed that getting the field is fine, the bug only affected the with/adjustInto method of WEEK_BASED_YEAR. The unit WEEK_BASED_YEARS is affected because the addition is implemented internally by reusing the broken WEEK_BASED_YEAR.

Update 2014-08-28: This was one of 14 java.time bugs fixed in 8u20.

Leave a Comment