Result of TimeZone.getDefault(): sun.util.calendar.ZoneInfo[id="America/Los_Angeles",offset=-28800000,dstSavings=3600000,useDaylight=true,transitions=185,lastRule=java.util.SimpleTimeZone[id=America/Los_Angeles,offset=-28800000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=3,startMonth=2,startDay=8,startDayOfWeek=1,startTime=7200000,startTimeMode=0,endMode=3,endMonth=10,endDay=1,endDayOfWeek=1,endTime=7200000,endTimeMode=0]]
Result of DateTimeZone.getDefault(): America/Los_Angeles
Problem description
When running on JDK 17, several Joda tests fail due to a change to the JDK's CLDR data: JDK-8265308
Test case
$ java -fullversion
openjdk full version "17.0.2+8-86"
$ mvn clean test
...
[ERROR] Tests run: 4232, Failures: 4, Errors: 0, Skipped: 0, Time elapsed: 2.129 s <<< FAILURE! - in org.joda.time.TestAllPackages
[ERROR] testPropertyGetMonthOfYear(org.joda.time.TestDateTime_Properties) Time elapsed: 0.004 s <<< FAILURE!
junit.framework.AssertionFailedError: expected:<3> but was:<4>
at junit.framework.Assert.fail(Assert.java:47)
at junit.framework.Assert.failNotEquals(Assert.java:280)
at junit.framework.Assert.assertEquals(Assert.java:64)
at junit.framework.Assert.assertEquals(Assert.java:198)
at junit.framework.Assert.assertEquals(Assert.java:204)
at org.joda.time.TestDateTime_Properties.testPropertyGetMonthOfYear(TestDateTime_Properties.java:361)
[ERROR] testPropertyGetMonthOfYear(org.joda.time.TestMutableDateTime_Properties) Time elapsed: 0 s <<< FAILURE!
junit.framework.AssertionFailedError: expected:<3> but was:<4>
at junit.framework.Assert.fail(Assert.java:47)
at junit.framework.Assert.failNotEquals(Assert.java:280)
at junit.framework.Assert.assertEquals(Assert.java:64)
at junit.framework.Assert.assertEquals(Assert.java:198)
at junit.framework.Assert.assertEquals(Assert.java:204)
at org.joda.time.TestMutableDateTime_Properties.testPropertyGetMonthOfYear(TestMutableDateTime_Properties.java:247)
[ERROR] testPropertyGetMonthOfYear(org.joda.time.TestDateMidnight_Properties) Time elapsed: 0 s <<< FAILURE!
junit.framework.AssertionFailedError: expected:<3> but was:<4>
at junit.framework.Assert.fail(Assert.java:47)
at junit.framework.Assert.failNotEquals(Assert.java:280)
at junit.framework.Assert.assertEquals(Assert.java:64)
at junit.framework.Assert.assertEquals(Assert.java:198)
at junit.framework.Assert.assertEquals(Assert.java:204)
at org.joda.time.TestDateMidnight_Properties.testPropertyGetMonthOfYear(TestDateMidnight_Properties.java:238)
[ERROR] testPropertyGetMonthOfYear(org.joda.time.TestMonthDay_Properties) Time elapsed: 0.001 s <<< FAILURE!
junit.framework.ComparisonFailure: expected:<Sep[]> but was:<Sep[t]>
at junit.framework.Assert.assertEquals(Assert.java:81)
at junit.framework.Assert.assertEquals(Assert.java:87)
at org.joda.time.TestMonthDay_Properties.testPropertyGetMonthOfYear(TestMonthDay_Properties.java:93)
Since the JDK 17 javac doesn't support -source 5 -target 5 I had to update the build to use Java 8, but compiling the tests as Java 5 and running on JDK 17 would reproduce the same issue:
Key information
TimeZone.getDefault()
:sun.util.calendar.ZoneInfo[id="America/Los_Angeles",offset=-28800000,dstSavings=3600000,useDaylight=true,transitions=185,lastRule=java.util.SimpleTimeZone[id=America/Los_Angeles,offset=-28800000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=3,startMonth=2,startDay=8,startDayOfWeek=1,startTime=7200000,startTimeMode=0,endMode=3,endMonth=10,endDay=1,endDayOfWeek=1,endTime=7200000,endTimeMode=0]]
DateTimeZone.getDefault()
:America/Los_Angeles
Problem description
When running on JDK 17, several Joda tests fail due to a change to the JDK's CLDR data: JDK-8265308
Test case
Since the JDK 17 javac doesn't support
-source 5 -target 5
I had to update the build to use Java 8, but compiling the tests as Java 5 and running on JDK 17 would reproduce the same issue: