From 9cfcd06bcc77d3681afb7beede1f04b64b558060 Mon Sep 17 00:00:00 2001 From: Mikhail Fedorov Date: Thu, 25 Mar 2021 20:59:06 +0300 Subject: [PATCH] Fix UserCountryNotSetValidatorLocaleTest fail if System.getProperty("user.country") is already null. (when LANG=C and openjdk in linux). --- .../validator/test/UserCountryNotSetValidatorLocaleTest.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/extensions/hibernate-validator/deployment/src/test/java/io/quarkus/hibernate/validator/test/UserCountryNotSetValidatorLocaleTest.java b/extensions/hibernate-validator/deployment/src/test/java/io/quarkus/hibernate/validator/test/UserCountryNotSetValidatorLocaleTest.java index 47206adc1caed..7eead10336d8b 100644 --- a/extensions/hibernate-validator/deployment/src/test/java/io/quarkus/hibernate/validator/test/UserCountryNotSetValidatorLocaleTest.java +++ b/extensions/hibernate-validator/deployment/src/test/java/io/quarkus/hibernate/validator/test/UserCountryNotSetValidatorLocaleTest.java @@ -30,7 +30,9 @@ public void run() { }).setAfterAllCustomizer(new Runnable() { @Override public void run() { - System.setProperty("user.country", userCountry); + if (userCountry != null) { + System.setProperty("user.country", userCountry); + } System.setProperty("user.language", userLanguage); } });