From d043adc56415d086c2bf7b196842959e07398262 Mon Sep 17 00:00:00 2001 From: tdurieux Date: Tue, 7 Mar 2017 13:25:34 +0100 Subject: [PATCH] fixed files form Lang #2 --- projects/Lang/2/org/apache/commons/lang3/LocaleUtils.java | 3 +++ 1 file changed, 3 insertions(+) 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);