Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8208932 | 8u201 | Ivan Gerasimov | P4 | Resolved | Fixed | b01 |
JDK-8196358 | 8u192 | Ivan Gerasimov | P4 | Resolved | Fixed | b01 |
JDK-8216833 | emb-8u201 | Ivan Gerasimov | P4 | Resolved | Fixed | master |
FULL PRODUCT VERSION :
A DESCRIPTION OF THE PROBLEM :
Adding more than 255 units of QUARTER_YEARS to a temporal instance is faulty. E.g. adding 256 QUARTER_YEARS is adding 1 year instead of 64 years.
See http://hg.openjdk.java.net/jdk9/jdk9/jdk/file/65464a307408/src/java.base/share/classes/java/time/temporal/IsoFields.java#l709
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
LocalDate d = LocalDate.of(1900, 1, 1);
System.out.println(d.plus(255, IsoFields.QUARTER_YEARS));
System.out.println(d.plus(256, IsoFields.QUARTER_YEARS));
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
1963-10-01
1964-01-01
ACTUAL -
1963-10-01
1901-01-01
REPRODUCIBILITY :
This bug can be reproduced always.
A DESCRIPTION OF THE PROBLEM :
Adding more than 255 units of QUARTER_YEARS to a temporal instance is faulty. E.g. adding 256 QUARTER_YEARS is adding 1 year instead of 64 years.
See http://hg.openjdk.java.net/jdk9/jdk9/jdk/file/65464a307408/src/java.base/share/classes/java/time/temporal/IsoFields.java#l709
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
LocalDate d = LocalDate.of(1900, 1, 1);
System.out.println(d.plus(255, IsoFields.QUARTER_YEARS));
System.out.println(d.plus(256, IsoFields.QUARTER_YEARS));
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
1963-10-01
1964-01-01
ACTUAL -
1963-10-01
1901-01-01
REPRODUCIBILITY :
This bug can be reproduced always.
- backported by
-
JDK-8196358 Adding 256 units of IsoFields.QUARTER_YEARS broken
- Resolved
-
JDK-8208932 Adding 256 units of IsoFields.QUARTER_YEARS broken
- Resolved
-
JDK-8216833 Adding 256 units of IsoFields.QUARTER_YEARS broken
- Resolved
- links to