[seam-commits] Seam SVN: r9001 - trunk/src/main/org/jboss/seam/core.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Tue Sep 16 18:04:32 EDT 2008


Author: pete.muir at 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);                             




More information about the seam-commits mailing list