You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Byron Foster (JIRA)" <de...@velocity.apache.org> on 2009/01/22 10:49:59 UTC

[jira] Created: (VELOCITY-677) a '#' or '$' character at the end of VTL causes a ParseException

a '#' or '$' character at the end of VTL causes a ParseException
----------------------------------------------------------------

                 Key: VELOCITY-677
                 URL: https://issues.apache.org/jira/browse/VELOCITY-677
             Project: Velocity
          Issue Type: Bug
          Components: Engine
    Affects Versions: 1.6.1, 1.6
            Reporter: Byron Foster
            Priority: Minor


If either the character '#' or '$' is the last character in VTL, then the following results:

Threw: class org.apache.velocity.exception.ParseErrorException
Msg: Lexical error: org.apache.velocity.runtime.parser.TokenMgrError: Lexical error at line 4, column 2. Encountered: after : ""
org.apache.velocity.Template.process(Template.java:142) 
org.apache.velocity.runtime.resource.ResourceManagerImpl.refreshResource(ResourceManagerImpl.java:556) 
org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:319) 
org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1442) 
org.apache.velocity.runtime.RuntimeSingleton.getTemplate(RuntimeSingleton.java:319) 
org.apache.velocity.app.Velocity.mergeTemplate(Velocity.java:332) 




-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org


[jira] Commented: (VELOCITY-677) a '#' or '$' character at the end of VTL causes a ParseException

Posted by "Byron Foster (JIRA)" <de...@velocity.apache.org>.
    [ https://issues.apache.org/jira/browse/VELOCITY-677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12666431#action_12666431 ] 

Byron Foster commented on VELOCITY-677:
---------------------------------------

Agreed, I'm not motivated to dig into this one, even though its definitely not good.

> a '#' or '$' character at the end of VTL causes a ParseException
> ----------------------------------------------------------------
>
>                 Key: VELOCITY-677
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-677
>             Project: Velocity
>          Issue Type: Bug
>          Components: Engine
>    Affects Versions: 1.6, 1.6.1, 1.7
>            Reporter: Byron Foster
>            Priority: Minor
>
> If either the character '#' or '$' is the last character in VTL, then the following results:
> Threw: class org.apache.velocity.exception.ParseErrorException
> Msg: Lexical error: org.apache.velocity.runtime.parser.TokenMgrError: Lexical error at line 4, column 2. Encountered: after : ""
> org.apache.velocity.Template.process(Template.java:142) 
> org.apache.velocity.runtime.resource.ResourceManagerImpl.refreshResource(ResourceManagerImpl.java:556) 
> org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:319) 
> org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1442) 
> org.apache.velocity.runtime.RuntimeSingleton.getTemplate(RuntimeSingleton.java:319) 
> org.apache.velocity.app.Velocity.mergeTemplate(Velocity.java:332) 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org


[jira] Updated: (VELOCITY-677) a '#' or '$' character at the end of VTL causes a ParseException

Posted by "Byron Foster (JIRA)" <de...@velocity.apache.org>.
     [ https://issues.apache.org/jira/browse/VELOCITY-677?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Byron Foster updated VELOCITY-677:
----------------------------------

    Description: 
If either the character '#' or '$' is the last character in VTL, then the following results:

Threw: class org.apache.velocity.exception.ParseErrorException
Msg: Lexical error: org.apache.velocity.runtime.parser.TokenMgrError: Lexical error at line 4, column 2. Encountered: <EOF> after : ""
org.apache.velocity.Template.process(Template.java:142) 
org.apache.velocity.runtime.resource.ResourceManagerImpl.refreshResource(ResourceManagerImpl.java:556) 
org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:319) 
org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1442) 
org.apache.velocity.runtime.RuntimeSingleton.getTemplate(RuntimeSingleton.java:319) 
org.apache.velocity.app.Velocity.mergeTemplate(Velocity.java:332) 




  was:
If either the character '#' or '$' is the last character in VTL, then the following results:

Threw: class org.apache.velocity.exception.ParseErrorException
Msg: Lexical error: org.apache.velocity.runtime.parser.TokenMgrError: Lexical error at line 4, column 2. Encountered: after : ""
org.apache.velocity.Template.process(Template.java:142) 
org.apache.velocity.runtime.resource.ResourceManagerImpl.refreshResource(ResourceManagerImpl.java:556) 
org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:319) 
org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1442) 
org.apache.velocity.runtime.RuntimeSingleton.getTemplate(RuntimeSingleton.java:319) 
org.apache.velocity.app.Velocity.mergeTemplate(Velocity.java:332) 





> a '#' or '$' character at the end of VTL causes a ParseException
> ----------------------------------------------------------------
>
>                 Key: VELOCITY-677
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-677
>             Project: Velocity
>          Issue Type: Bug
>          Components: Engine
>    Affects Versions: 1.6, 1.6.1, 1.7
>            Reporter: Byron Foster
>            Priority: Minor
>
> If either the character '#' or '$' is the last character in VTL, then the following results:
> Threw: class org.apache.velocity.exception.ParseErrorException
> Msg: Lexical error: org.apache.velocity.runtime.parser.TokenMgrError: Lexical error at line 4, column 2. Encountered: <EOF> after : ""
> org.apache.velocity.Template.process(Template.java:142) 
> org.apache.velocity.runtime.resource.ResourceManagerImpl.refreshResource(ResourceManagerImpl.java:556) 
> org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:319) 
> org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1442) 
> org.apache.velocity.runtime.RuntimeSingleton.getTemplate(RuntimeSingleton.java:319) 
> org.apache.velocity.app.Velocity.mergeTemplate(Velocity.java:332) 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org


[jira] Commented: (VELOCITY-677) a '#' or '$' character at the end of VTL causes a ParseException

Posted by "Jarkko Viinamäki (JIRA)" <de...@velocity.apache.org>.
    [ https://issues.apache.org/jira/browse/VELOCITY-677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12666173#action_12666173 ] 

Jarkko Viinamäki commented on VELOCITY-677:
-------------------------------------------

Since there's a trivial workaround for this (use a reference to put that # or $ in place), I'm not sure if this is worth fixing _IF_ it requires complex tweaking of the parser. It's already cryptic enough. :)

> a '#' or '$' character at the end of VTL causes a ParseException
> ----------------------------------------------------------------
>
>                 Key: VELOCITY-677
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-677
>             Project: Velocity
>          Issue Type: Bug
>          Components: Engine
>    Affects Versions: 1.6, 1.6.1, 1.7
>            Reporter: Byron Foster
>            Priority: Minor
>
> If either the character '#' or '$' is the last character in VTL, then the following results:
> Threw: class org.apache.velocity.exception.ParseErrorException
> Msg: Lexical error: org.apache.velocity.runtime.parser.TokenMgrError: Lexical error at line 4, column 2. Encountered: after : ""
> org.apache.velocity.Template.process(Template.java:142) 
> org.apache.velocity.runtime.resource.ResourceManagerImpl.refreshResource(ResourceManagerImpl.java:556) 
> org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:319) 
> org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1442) 
> org.apache.velocity.runtime.RuntimeSingleton.getTemplate(RuntimeSingleton.java:319) 
> org.apache.velocity.app.Velocity.mergeTemplate(Velocity.java:332) 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org


[jira] Updated: (VELOCITY-677) a '#' or '$' character at the end of VTL causes a ParseException

Posted by "Byron Foster (JIRA)" <de...@velocity.apache.org>.
     [ https://issues.apache.org/jira/browse/VELOCITY-677?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Byron Foster updated VELOCITY-677:
----------------------------------

    Affects Version/s: 1.7

> a '#' or '$' character at the end of VTL causes a ParseException
> ----------------------------------------------------------------
>
>                 Key: VELOCITY-677
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-677
>             Project: Velocity
>          Issue Type: Bug
>          Components: Engine
>    Affects Versions: 1.6, 1.6.1, 1.7
>            Reporter: Byron Foster
>            Priority: Minor
>
> If either the character '#' or '$' is the last character in VTL, then the following results:
> Threw: class org.apache.velocity.exception.ParseErrorException
> Msg: Lexical error: org.apache.velocity.runtime.parser.TokenMgrError: Lexical error at line 4, column 2. Encountered: after : ""
> org.apache.velocity.Template.process(Template.java:142) 
> org.apache.velocity.runtime.resource.ResourceManagerImpl.refreshResource(ResourceManagerImpl.java:556) 
> org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:319) 
> org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1442) 
> org.apache.velocity.runtime.RuntimeSingleton.getTemplate(RuntimeSingleton.java:319) 
> org.apache.velocity.app.Velocity.mergeTemplate(Velocity.java:332) 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org