Skip to content

Test does not restore default locale #1023

@eleumik

Description

@eleumik

https://github.com/stleary/JSON-java/blob/master/src/test/java/org/json/junit/JSONObjectLocaleTest.java

This test changes the default JVM locale and doesn’t restore it.
Since Maven runs tests in the same JVM unless forking is enabled, this can influence other tests.

Yesterday i checked all the occurrences of Locale.setDefault in my projects and I found also this. It causes subtle problems when running / mvn packaging many modules together.

It is of course very low priority and relevant only if one runs many builds in sequence, more for other projects than for this one

Thanks
Michele

PS. today is TimeZone.setDefault day, yes I am having fun...

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions