jamesfredley commented on code in PR #15398:
URL: https://github.com/apache/grails-core/pull/15398#discussion_r2824961625


##########
grails-gsp/core/src/main/groovy/org/grails/gsp/compiler/GroovyPageParser.java:
##########
@@ -463,14 +463,11 @@ public void writeLineNumbers(File filename) throws 
IOException {
     }
 
     private void declare(boolean gsp) {
-        if (finalPass) {

Review Comment:
   The `finalPass` guard is irrelevant because the new code unconditionally 
throws a `GrailsTagException`. Since `declare()` is called during pass 1 (when 
`finalPass=false`), the exception fires immediately on the first encounter. 
There's no reason to let pass 1 succeed and then throw on pass 2 - the guard 
would be dead code after the `throw`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to