Skip to content

Jackson3 was released. That would require some work if we want to sup…#72

Merged
mihxil merged 20 commits intomainfrom
jackson3-support
Jan 9, 2026
Merged

Jackson3 was released. That would require some work if we want to sup…#72
mihxil merged 20 commits intomainfrom
jackson3-support

Conversation

@mihxil
Copy link
Collaborator

@mihxil mihxil commented Nov 25, 2025

…port it. This branch.

@mihxil mihxil marked this pull request as ready for review January 9, 2026 15:56
@mihxil mihxil requested a review from Copilot January 9, 2026 15:56
@mihxil mihxil merged commit 4a9ccd6 into main Jan 9, 2026
4 of 5 checks passed
@mihxil mihxil deleted the jackson3-support branch January 9, 2026 15:58
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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())) {
Copy link

Copilot AI Jan 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
if (ctxt.getConfig().hasDeserializationFeatures(EnumFeature.READ_UNKNOWN_ENUM_VALUES_AS_NULL. getMask())) {
if (ctxt.getConfig().hasDeserializationFeatures(EnumFeature.READ_UNKNOWN_ENUM_VALUES_AS_NULL.getMask())) {

Copilot uses AI. Check for mistakes.
"mid": "POMS_NCRV_1138990",
"deleted": true
}
}
Copy link

Copilot AI Jan 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The closing bracket for the array is missing on this line. There should be a closing bracket ] after line 42.

Suggested change
}
]

Copilot uses AI. Check for mistakes.
* 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.
Copy link

Copilot AI Jan 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reference in this documentation comment still refers to Jackson2Mapper but should be updated to Jackson3Mapper since this is in the jackson3 package.

Suggested change
* @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.

Copilot uses AI. Check for mistakes.
public class IterableJsonTest {

@XmlAccessorType(XmlAccessType.FIELD)
public static class A {
Copy link

Copilot AI Jan 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Class A overrides equals but not hashCode.

Copilot uses AI. Check for mistakes.
Comment on lines +36 to +37
public Duration deserialize(JsonParser jp, DeserializationContext ctxt) {
return Duration.ofMillis((long) (Float.parseFloat(jp.getValueAsString()) * 1000));
Copy link

Copilot AI Jan 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Potential uncaught 'java.lang.NumberFormatException'.

Suggested change
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;
}

Copilot uses AI. Check for mistakes.
* 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.
Copy link

Copilot AI Jan 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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()".

Suggested change
* @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.

Copilot uses AI. Check for mistakes.
* @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.
Copy link

Copilot AI Jan 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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()".

Suggested change
* @param skipNulls Whether to skip nulls in the array. Default true.
* skipNulls: Whether to skip nulls in the array. Default true.

Copilot uses AI. Check for mistakes.
* 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.
Copy link

Copilot AI Jan 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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()".

Suggested change
* @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.

Copilot uses AI. Check for mistakes.
public A(String x) {
this.x = x;
}
public boolean equals(Object other){
Copy link

Copilot AI Jan 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method overrides Object.equals; it is advisable to add an Override annotation.

Copilot uses AI. Check for mistakes.
}
return assertThat(rounded);
}
public A get() {
Copy link

Copilot AI Jan 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method overrides Supplier.get; it is advisable to add an Override annotation.

Copilot uses AI. Check for mistakes.
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

Successfully merging this pull request may close these issues.

1 participant