Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InstantTypeAdaptor fails on seconds #32

Open
Phalguna2125 opened this issue Jul 28, 2023 · 0 comments
Open

InstantTypeAdaptor fails on seconds #32

Phalguna2125 opened this issue Jul 28, 2023 · 0 comments

Comments

@Phalguna2125
Copy link

Hi ,

If json has time field represented as number of Seconds InstantConverter failed to deserialize it.

I have a test case where i use gson parse along with awaitility with seconds
Published kafka record has gson.tojson mapping
20230728_125833

Throwing following exception::

Failed making field "java.time.Instant.seconds' accessible; either change its visibility or write a custom TypeAdapter for its declaring typel
þal.reflect .ReflectionHelper.makeAccessible (ReflectionHelper.java:22)
mal.bind. ReflectiveTypeAdapterFactory.getBoundField
Caused by: java.lang.reflect.Inaccessible@bjectException: Unable to make field private final long java.time.Instant.seconds accessible: module

I tried following way of registering adaptor but still no success

Any suggestions could you kindly provide.. thanks in advance

Screenshot_20230728_113453_Gallery

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant