Author: chris.laprun(a)jboss.com
Date: 2012-01-30 05:55:43 -0500 (Mon, 30 Jan 2012)
New Revision: 8319
Modified:
portal/trunk/component/common/src/main/java/org/exoplatform/commons/utils/I18N.java
Log:
- Adding information to exception. Note that this class doesn't properly parse valid
language identifiers in Java 7 as ja_JP_JP_#u-ca-japanese is a valid identifier in Java 7
but is rejected by the current parsing code. See GTNPORTAL-2337
Modified:
portal/trunk/component/common/src/main/java/org/exoplatform/commons/utils/I18N.java
===================================================================
---
portal/trunk/component/common/src/main/java/org/exoplatform/commons/utils/I18N.java 2012-01-30
04:15:11 UTC (rev 8318)
+++
portal/trunk/component/common/src/main/java/org/exoplatform/commons/utils/I18N.java 2012-01-30
10:55:43 UTC (rev 8319)
@@ -74,7 +74,7 @@
}
else if (!isLetter(c0) || s.length() < 2 || !isLetter(s.charAt(1)))
{
- throw new IllegalArgumentException();
+ throw new IllegalArgumentException("Invalid Java Locale identifier:
'" + s + "'");
}
else
{
@@ -133,7 +133,7 @@
{
if (!isLetter(s.charAt(i)))
{
- throw new IllegalArgumentException();
+ throw new IllegalArgumentException("Invalid Java Locale identifier:
'" + s + "'");
}
}
String variant = s.substring(index + 1);
Show replies by date