You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Generated ObjectId is generating exceptions that are being written to stderr #243
When using @jsoncreator based classes and @ObjectId there is an UnsupportedOperationException when trying to set the returned ObjectId.
This is because of JacksonCodec:120 :
beanPropertyDefinition.getMutator().setValue(
getMutator returns by default the constructor parameter, and jackson cannot mutate (setValue) on a constructor parameter, so the exception is raised.
A simple fix would be to use the alternative method getNonConstructorMutator() in which we can get the Setter and thus, change the value without raising an exception.
In my case I'm not entirely interested in mutating the inserted POJO, but the main problem I have is the exception is constantly being written to stderr because of the line 126:
I released 4.11.0, with this addition of SLF4J. If you would like to provide a fix to the underlying issue along with tests via PR, please feel free to do so.
Activity
Add logging interfaces and use them to handle log messages in #243
rlodge commentedon Feb 29, 2024
Published a 4.11.0-SNAPSHOT version that utilizes slf4j to log these instead.
rlodge commentedon Mar 10, 2024
I released 4.11.0, with this addition of SLF4J. If you would like to provide a fix to the underlying issue along with tests via PR, please feel free to do so.