Author: pete.muir(a)jboss.org
Date: 2008-09-16 18:04:32 -0400 (Tue, 16 Sep 2008)
New Revision: 9001
Modified:
trunk/src/main/org/jboss/seam/core/Interpolator.java
Log:
JBSEAM-2499
Modified: trunk/src/main/org/jboss/seam/core/Interpolator.java
===================================================================
--- trunk/src/main/org/jboss/seam/core/Interpolator.java 2008-09-16 09:34:31 UTC (rev
9000)
+++ trunk/src/main/org/jboss/seam/core/Interpolator.java 2008-09-16 22:04:32 UTC (rev
9001)
@@ -122,8 +122,15 @@
} else if (nextTok.equals("}")) {
if (--level == 0) {
try {
- String value = new MessageFormat(expr.toString(),
Locale.instance()).format(params);
- builder.append(value);
+ if (params.length == 0)
+ {
+ builder.append(expr.toString());
+ }
+ else
+ {
+ String value = new MessageFormat(expr.toString(),
Locale.instance()).format(params);
+ builder.append(value);
+ }
} catch (Exception e) {
// if it is a bad message, use the expression itself
builder.append(expr);
Show replies by date