Closed ghost closed 7 years ago
ah -the new 1.8 time api has not been tested yet .. thanks for the report
cannot reproduce. I tested using fst 2.48 your snippet as well this testcase:
@Test
public void test() throws IOException {
FSTConfiguration conf = FSTConfiguration.createDefaultConfiguration();
Object[] x = { Duration.ofDays(1), Duration.ofDays(2) };
Object[] res = (Object[]) conf.asObject(conf.asByteArray(x));
Assert.assertTrue( x[0].equals(res[0]) && x[1].equals(res[1]));
}
tried JDK1.8_u45 and JDK1.8_u121
This program
fails with
(The exception occurs with several other types in java.time, not only Duration)