This is an automated email from the ASF dual-hosted git repository.

ddekany pushed a commit to branch 2.3-gae
in repository https://gitbox.apache.org/repos/asf/freemarker.git

commit ffd0bf4f69b7b7edd0a5233b9463e1b927312bb7
Author: ddekany <[email protected]>
AuthorDate: Sat Nov 30 20:19:43 2024 +0100

    Minor code cleanup for #switch/#on
---
 freemarker-core/src/main/javacc/freemarker/core/FTL.jj | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/freemarker-core/src/main/javacc/freemarker/core/FTL.jj 
b/freemarker-core/src/main/javacc/freemarker/core/FTL.jj
index bac38d61..72c191de 100644
--- a/freemarker-core/src/main/javacc/freemarker/core/FTL.jj
+++ b/freemarker-core/src/main/javacc/freemarker/core/FTL.jj
@@ -3916,11 +3916,9 @@ SwitchBlock Switch() :
                     hadDefault = true;
                 } else {
                     if (hadOn) {
-                        if (caseOrDefault.condition != null) {
-                            throw new ParseException(
-                                    "You can't use both #on, and #case in a 
#switch block, and you already had an #on.",
-                                    caseOrDefault);
-                        }
+                        throw new ParseException(
+                                "You can't use both #on, and #case in a 
#switch block, and you already had an #on.",
+                                caseOrDefault);
                     }
                     hadCase = true;
                 }

Reply via email to