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

Deserialization of Throwables with PropertyNamingStrategy does not work #3497

Closed
cowtowncoder opened this issue May 26, 2022 · 1 comment
Closed
Milestone

Comments

@cowtowncoder
Copy link
Member

(note: follow up to #3275 )

It looks like following test would fail:

    public void testDeserializeWithNamingStrategy() throws IOException {
        final ObjectMapper mapper = JsonMapper.builder()
                .propertyNamingStrategy(PropertyNamingStrategies.UPPER_CAMEL_CASE)
                .build();
        Exception ex = mapper.readValue(a2q(
                "{'Message':'Message!, 'Cause':{}}"
                ),
                Exception.class);
        assertNotNull(ex);
    }

since naming strategy is not considered when constructing deserializer for Throwable types.
It should work.

@cowtowncoder cowtowncoder added to-evaluate Issue that has been received but not yet evaluated 2.13 and removed to-evaluate Issue that has been received but not yet evaluated labels May 26, 2022
@cowtowncoder cowtowncoder added 2.14 and removed 2.13 labels May 27, 2022
@cowtowncoder cowtowncoder added this to the 2.14.0 milestone May 27, 2022
@cowtowncoder
Copy link
Member Author

Solved for the most part: specifically for strategies that only change casing (like UPPER_CAMEL_CASE).
Some issues likely still remain for other kinds (kebab, snake style) wrt ThrowableDeserializer (whereas StackTraceElementDeserializer works fine with them) but those will need to be handled with more work

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