Jackson3 was released. That would require some work if we want to sup…#72
Jackson3 was released. That would require some work if we want to sup…#72
Conversation
…port it. This branch.
There was a problem hiding this comment.
Copilot reviewed 63 out of 63 changed files in this pull request and generated 19 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| try { | ||
| return Enum.valueOf(enumClass, jp.getValueAsString().toUpperCase()); | ||
| } catch (IllegalArgumentException iaeu) { | ||
| if (ctxt.getConfig().hasDeserializationFeatures(EnumFeature.READ_UNKNOWN_ENUM_VALUES_AS_NULL. getMask())) { |
There was a problem hiding this comment.
There is a space before the dot in getMask(). The method call should be EnumFeature.READ_UNKNOWN_ENUM_VALUES_AS_NULL.getMask() without the space before the period.
| if (ctxt.getConfig().hasDeserializationFeatures(EnumFeature.READ_UNKNOWN_ENUM_VALUES_AS_NULL. getMask())) { | |
| if (ctxt.getConfig().hasDeserializationFeatures(EnumFeature.READ_UNKNOWN_ENUM_VALUES_AS_NULL.getMask())) { |
| "mid": "POMS_NCRV_1138990", | ||
| "deleted": true | ||
| } | ||
| } |
There was a problem hiding this comment.
The closing bracket for the array is missing on this line. There should be a closing bracket ] after line 42.
| } | |
| ] |
| * of the 'complete' result can be in the beginning of the json in this field. | ||
| * @param objectMapper Default the objectMapper {@link Jackson3Mapper#LENIENT} will be used (in | ||
| * conjunction with <code>valueClass</code>, but you may specify another one | ||
| * @param logger Default this is logging to nl.vpro.jackson2.JsonArrayIterator, but you may override that. |
There was a problem hiding this comment.
The reference in this documentation comment still refers to Jackson2Mapper but should be updated to Jackson3Mapper since this is in the jackson3 package.
| * @param logger Default this is logging to nl.vpro.jackson2.JsonArrayIterator, but you may override that. | |
| * @param logger Default this is logging to nl.vpro.jackson3.JsonArrayIterator, but you may override that. |
| public Duration deserialize(JsonParser jp, DeserializationContext ctxt) { | ||
| return Duration.ofMillis((long) (Float.parseFloat(jp.getValueAsString()) * 1000)); |
There was a problem hiding this comment.
Potential uncaught 'java.lang.NumberFormatException'.
| public Duration deserialize(JsonParser jp, DeserializationContext ctxt) { | |
| return Duration.ofMillis((long) (Float.parseFloat(jp.getValueAsString()) * 1000)); | |
| public Duration deserialize(JsonParser jp, DeserializationContext ctxt) throws JacksonException { | |
| String text = jp.getValueAsString(); | |
| if (text == null) { | |
| return null; | |
| } | |
| try { | |
| float seconds = Float.parseFloat(text); | |
| return Duration.ofMillis((long) (seconds * 1000)); | |
| } catch (NumberFormatException e) { | |
| ctxt.reportInputMismatch(Duration.class, | |
| "Cannot deserialize Duration from value (%s) as floating-point seconds", text); | |
| // reportInputMismatch always throws, but return is required for compilation | |
| return null; | |
| } |
| * of the 'complete' result can be in the beginning of the json in this field. | ||
| * @param objectMapper Default the objectMapper {@link Jackson3Mapper#LENIENT} will be used (in | ||
| * conjunction with <code>valueClass</code>, but you may specify another one | ||
| * @param logger Default this is logging to nl.vpro.jackson2.JsonArrayIterator, but you may override that. |
There was a problem hiding this comment.
@param tag "logger" does not match any actual parameter of method "toString()".
@param tag "logger" does not match any actual parameter of method "build()".
@param tag "logger" does not match any actual parameter of method "eventListener()".
@param tag "logger" does not match any actual parameter of method "skipNulls()".
@param tag "logger" does not match any actual parameter of method "objectMapper()".
@param tag "logger" does not match any actual parameter of method "totalSizeField()".
@param tag "logger" does not match any actual parameter of method "sizeField()".
@param tag "logger" does not match any actual parameter of method "callback()".
@param tag "logger" does not match any actual parameter of method "valueClass()".
@param tag "logger" does not match any actual parameter of method "valueCreator()".
@param tag "logger" does not match any actual parameter of method "inputStream()".
@param tag "logger" does not match any actual parameter of method "_builder()".
@param tag "logger" does not match any actual parameter of constructor "Builder()".
| * @param logger Default this is logging to nl.vpro.jackson2.JsonArrayIterator, but you may override that. | |
| * Logger: Default this is logging to nl.vpro.jackson2.JsonArrayIterator, but you may override that. |
| * @param objectMapper Default the objectMapper {@link Jackson3Mapper#LENIENT} will be used (in | ||
| * conjunction with <code>valueClass</code>, but you may specify another one | ||
| * @param logger Default this is logging to nl.vpro.jackson2.JsonArrayIterator, but you may override that. | ||
| * @param skipNulls Whether to skip nulls in the array. Default true. |
There was a problem hiding this comment.
@param tag "skipNulls" does not match any actual parameter of method "toString()".
@param tag "skipNulls" does not match any actual parameter of method "build()".
@param tag "skipNulls" does not match any actual parameter of method "eventListener()".
@param tag "skipNulls" does not match any actual parameter of method "logger()".
@param tag "skipNulls" does not match any actual parameter of method "objectMapper()".
@param tag "skipNulls" does not match any actual parameter of method "totalSizeField()".
@param tag "skipNulls" does not match any actual parameter of method "sizeField()".
@param tag "skipNulls" does not match any actual parameter of method "callback()".
@param tag "skipNulls" does not match any actual parameter of method "valueClass()".
@param tag "skipNulls" does not match any actual parameter of method "valueCreator()".
@param tag "skipNulls" does not match any actual parameter of method "inputStream()".
@param tag "skipNulls" does not match any actual parameter of method "_builder()".
@param tag "skipNulls" does not match any actual parameter of constructor "Builder()".
| * @param skipNulls Whether to skip nulls in the array. Default true. | |
| * skipNulls: Whether to skip nulls in the array. Default true. |
| * conjunction with <code>valueClass</code>, but you may specify another one | ||
| * @param logger Default this is logging to nl.vpro.jackson2.JsonArrayIterator, but you may override that. | ||
| * @param skipNulls Whether to skip nulls in the array. Default true. | ||
| * @param eventListener A listener for events that happen during parsing and iteration of the array. See {@link Event} and extension classes. |
There was a problem hiding this comment.
@param tag "eventListener" does not match any actual parameter of method "toString()".
@param tag "eventListener" does not match any actual parameter of method "build()".
@param tag "eventListener" does not match any actual parameter of method "skipNulls()".
@param tag "eventListener" does not match any actual parameter of method "logger()".
@param tag "eventListener" does not match any actual parameter of method "objectMapper()".
@param tag "eventListener" does not match any actual parameter of method "totalSizeField()".
@param tag "eventListener" does not match any actual parameter of method "sizeField()".
@param tag "eventListener" does not match any actual parameter of method "callback()".
@param tag "eventListener" does not match any actual parameter of method "valueClass()".
@param tag "eventListener" does not match any actual parameter of method "valueCreator()".
@param tag "eventListener" does not match any actual parameter of method "inputStream()".
@param tag "eventListener" does not match any actual parameter of method "_builder()".
@param tag "eventListener" does not match any actual parameter of constructor "Builder()".
| * @param eventListener A listener for events that happen during parsing and iteration of the array. See {@link Event} and extension classes. | |
| * A listener for events that happen during parsing and iteration of the array. See {@link Event} and extension classes. |
| public A(String x) { | ||
| this.x = x; | ||
| } | ||
| public boolean equals(Object other){ |
There was a problem hiding this comment.
This method overrides Object.equals; it is advisable to add an Override annotation.
…port it. This branch.