diff --git a/projects/Lang/2/org/apache/commons/lang3/LocaleUtils.java b/projects/Lang/2/org/apache/commons/lang3/LocaleUtils.java index 8a1203a..fab00c5 100644 --- a/projects/Lang/2/org/apache/commons/lang3/LocaleUtils.java +++ b/projects/Lang/2/org/apache/commons/lang3/LocaleUtils.java @@ -89,6 +89,9 @@ public static Locale toLocale(final String str) { if (str == null) { return null; } + if (str.contains("#")) { // LANG-879 - Cannot handle Java 7 script & extensions + throw new IllegalArgumentException("Invalid locale format: " + str); + } final int len = str.length(); if (len < 2) { throw new IllegalArgumentException("Invalid locale format: " + str);