Configure Jackson for nanosecond precision

Closes gh-9461
This commit is contained in:
Josh Cummings 2021-02-11 18:54:34 -07:00
parent a0a9718b8b
commit 5e5ff27109
No known key found for this signature in database
GPG Key ID: 49EF60DD7FF83443
1 changed files with 4 additions and 0 deletions

View File

@ -24,6 +24,7 @@ import java.util.List;
import java.util.stream.Collectors;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.datatype.jsr310.DecimalUtils;
import org.junit.Before;
@ -64,6 +65,9 @@ public class OAuth2AuthenticationTokenMixinTests {
ClassLoader loader = getClass().getClassLoader();
this.mapper = new ObjectMapper();
this.mapper.registerModules(SecurityJackson2Modules.getModules(loader));
// see https://github.com/FasterXML/jackson-databind/issues/3052 for details
this.mapper.configure(DeserializationFeature.USE_BIG_DECIMAL_FOR_FLOATS, true);
}
@Test