[seam-commits] Seam SVN: r9790 - branches/community/Seam_2_0/src/main/org/jboss/seam/core.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Tue Dec 16 13:38:32 EST 2008


Author: youngm
Date: 2008-12-16 13:38:32 -0500 (Tue, 16 Dec 2008)
New Revision: 9790

Modified:
   branches/community/Seam_2_0/src/main/org/jboss/seam/core/Interpolator.java
Log:
JBSEAM-2197

Modified: branches/community/Seam_2_0/src/main/org/jboss/seam/core/Interpolator.java
===================================================================
--- branches/community/Seam_2_0/src/main/org/jboss/seam/core/Interpolator.java	2008-12-16 16:11:06 UTC (rev 9789)
+++ branches/community/Seam_2_0/src/main/org/jboss/seam/core/Interpolator.java	2008-12-16 18:38:32 UTC (rev 9790)
@@ -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