Skip to content

Conversation

@mumbler6
Copy link
Contributor

The order of the objects in response string returned by target("entity/simple").request().get(String.class) isn't guaranteed to be consistent, returning <{"value":"World","name":"Hello"}> instead of <{"name":"Hello","value":"World"}>. The test case testDisabledModule() fails if this happens.

This PR proposes to convert the response and expected strings into Lists, which are then sorted, so that the order assumptions (in this PR, alphabetical order) in the test cases are correct.

This change was confirmed by running the NonDex tool, which explores and reports errors in different behaviors of under-determined Java APIs.

To reproduce this problem, you can run the test with NonDex using these commands:

mvn install -pl media/json-jackson -am -DskipTests
mvn edu.illinois:nondex-maven-plugin:2.1.7:nondex -pl media/json-jackson -Dtest=org.glassfish.jersey.jackson.internal.DefaultJsonJacksonProviderForBothModulesTest#testDisabledModule

Here are screenshots of the output produced by NonDex before and after the fix:

image
image

Please let me know if you want to discuss these changes.

@senivam senivam merged commit 47e37bd into eclipse-ee4j:2.x Nov 15, 2024
@senivam senivam added this to the 2.46 milestone Nov 15, 2024
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.

3 participants