This is an automated email from the git hooks/post-receive script. New commit to branch feature/java9+ in repository i18n. See https://gitlab.nuiton.org/nuiton/i18n.git commit 346f5ad69c4bb78f4a03985d02cb44bbd6cc72bb Author: Arnaud Thimel <thimel@codelutin.com> Date: Fri Jan 3 17:31:04 2020 +0100 [iso] code style --- nuiton-i18n/src/main/java/org/nuiton/i18n/I18nUtil.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nuiton-i18n/src/main/java/org/nuiton/i18n/I18nUtil.java b/nuiton-i18n/src/main/java/org/nuiton/i18n/I18nUtil.java index 5ad25cf..236e762 100644 --- a/nuiton-i18n/src/main/java/org/nuiton/i18n/I18nUtil.java +++ b/nuiton-i18n/src/main/java/org/nuiton/i18n/I18nUtil.java @@ -93,18 +93,18 @@ public class I18nUtil { public static Locale[] parseLocales(String str) throws IllegalArgumentException { List<Locale> result = new ArrayList<Locale>(); String[] bundlesToUse = str.split(","); - for (int i = 0, j = bundlesToUse.length; i < j; i++) { - String s = bundlesToUse[i].trim(); + for (String value : bundlesToUse) { + String s = value.trim(); // on devrait verifier que le bundle existe try { Locale l = LOCALE_CONVERTER.valueOf(s); result.add(l); } catch (Exception e) { throw new IllegalArgumentException("bundle " + s + - " is not a valid locale", e); + " is not a valid locale", e); } } - return result.toArray(new Locale[result.size()]); + return result.toArray(new Locale[0]); } public static Locale newLocale(String str) { -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.