[jira] [Comment Edited] (VELOCITY-900) Velocity.evalute thows an exception if the next char after a keyword is '_'

2018-09-06 Thread Thomas Mortagne (JIRA)


[ 
https://issues.apache.org/jira/browse/VELOCITY-900?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16605622#comment-16605622
 ] 

Thomas Mortagne edited comment on VELOCITY-900 at 9/6/18 10:46 AM:
---

This is probably because Velocity thinks you are trying to call the directive 
"end__" since _ is valid in a directive name. You can workaround it by using 
{noformat}#{end}{noformat}.


was (Author: tmortagne):
This is probably because Velocity thinks you are trying to call the directive 
"end__" since _ is valid in a directive name. You can workaround it by using 
{{#{end}}}.

> Velocity.evalute thows an exception if the next char after a keyword is '_'
> ---
>
> Key: VELOCITY-900
> URL: https://issues.apache.org/jira/browse/VELOCITY-900
> Project: Velocity
>  Issue Type: Bug
>  Components: Engine
>Affects Versions: 2.0
> Environment: Win 7, Java 8
>Reporter: Alto
>Priority: Major
>
> If I try to evalute the folling template "CONSTRAINT 
> DF_#if(${archiveTableTemplate})${archiveTableTemplate}#else${table}#end__${column}"
>  an exception is thrown.
> Velocity.evaluate(myContext, myStringWriter, "LOG", template); = >Exception 
> occurred in target VM: Encountered "" at LOG[line 1, column 93]
> Was expecting one of:
>     "(" ...
>     ")" ...
>      ...
>     "]]#" ...
>      ...
>      ...
>      ...
>      ...
>      ...
>      ...
>      ...
>     "{" ...
>     "}" ...
>     "" ...
>     "\\" ...
>      ...
>      ...
>      ...
>     "{" ...
>     <
> If I use the Template "CONSTRAINT 
> DF_#if(${archiveTableTemplate})${archiveTableTemplate}#else${table}#end 
> __${column}" it works, but the result is wrong. Blank after replacement.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Commented] (VELOCITY-900) Velocity.evalute thows an exception if the next char after a keyword is '_'

2018-09-06 Thread Thomas Mortagne (JIRA)


[ 
https://issues.apache.org/jira/browse/VELOCITY-900?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16605622#comment-16605622
 ] 

Thomas Mortagne commented on VELOCITY-900:
--

This is probably because Velocity thinks you are trying to call the directive 
"end__" since _ is valid in a directive name. You can workaround it by using 
{{#{end}}}.

> Velocity.evalute thows an exception if the next char after a keyword is '_'
> ---
>
> Key: VELOCITY-900
> URL: https://issues.apache.org/jira/browse/VELOCITY-900
> Project: Velocity
>  Issue Type: Bug
>  Components: Engine
>Affects Versions: 2.0
> Environment: Win 7, Java 8
>Reporter: Alto
>Priority: Major
>
> If I try to evalute the folling template "CONSTRAINT 
> DF_#if(${archiveTableTemplate})${archiveTableTemplate}#else${table}#end__${column}"
>  an exception is thrown.
> Velocity.evaluate(myContext, myStringWriter, "LOG", template); = >Exception 
> occurred in target VM: Encountered "" at LOG[line 1, column 93]
> Was expecting one of:
>     "(" ...
>     ")" ...
>      ...
>     "]]#" ...
>      ...
>      ...
>      ...
>      ...
>      ...
>      ...
>      ...
>     "{" ...
>     "}" ...
>     "" ...
>     "\\" ...
>      ...
>      ...
>      ...
>     "{" ...
>     <
> If I use the Template "CONSTRAINT 
> DF_#if(${archiveTableTemplate})${archiveTableTemplate}#else${table}#end 
> __${column}" it works, but the result is wrong. Blank after replacement.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Comment Edited] (VELOCITY-900) Velocity.evalute thows an exception if the next char after a keyword is '_'

2018-09-06 Thread Thomas Mortagne (JIRA)


[ 
https://issues.apache.org/jira/browse/VELOCITY-900?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16605622#comment-16605622
 ] 

Thomas Mortagne edited comment on VELOCITY-900 at 9/6/18 10:46 AM:
---

This is probably because Velocity thinks you are trying to call the directive 
"end__" since _ is valid in a directive name. You can workaround it by using 
{noformat}#{end}{noformat}. So same logic as the variables.


was (Author: tmortagne):
This is probably because Velocity thinks you are trying to call the directive 
"end__" since _ is valid in a directive name. You can workaround it by using 
{noformat}#{end}{noformat}.

> Velocity.evalute thows an exception if the next char after a keyword is '_'
> ---
>
> Key: VELOCITY-900
> URL: https://issues.apache.org/jira/browse/VELOCITY-900
> Project: Velocity
>  Issue Type: Bug
>  Components: Engine
>Affects Versions: 2.0
> Environment: Win 7, Java 8
>Reporter: Alto
>Priority: Major
>
> If I try to evalute the folling template "CONSTRAINT 
> DF_#if(${archiveTableTemplate})${archiveTableTemplate}#else${table}#end__${column}"
>  an exception is thrown.
> Velocity.evaluate(myContext, myStringWriter, "LOG", template); = >Exception 
> occurred in target VM: Encountered "" at LOG[line 1, column 93]
> Was expecting one of:
>     "(" ...
>     ")" ...
>      ...
>     "]]#" ...
>      ...
>      ...
>      ...
>      ...
>      ...
>      ...
>      ...
>     "{" ...
>     "}" ...
>     "" ...
>     "\\" ...
>      ...
>      ...
>      ...
>     "{" ...
>     <
> If I use the Template "CONSTRAINT 
> DF_#if(${archiveTableTemplate})${archiveTableTemplate}#else${table}#end 
> __${column}" it works, but the result is wrong. Blank after replacement.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Created] (VELOCITY-900) Velocity.evalute thows an exception if the next char after a keyword is '_'

2018-09-06 Thread Alto (JIRA)
Alto created VELOCITY-900:
-

 Summary: Velocity.evalute thows an exception if the next char 
after a keyword is '_'
 Key: VELOCITY-900
 URL: https://issues.apache.org/jira/browse/VELOCITY-900
 Project: Velocity
  Issue Type: Bug
  Components: Engine
Affects Versions: 2.0
 Environment: Win 7, Java 8
Reporter: Alto


If I try to evalute the folling template "CONSTRAINT 
DF_#if(${archiveTableTemplate})${archiveTableTemplate}#else${table}#end__${column}"
 an exception is thrown.

Velocity.evaluate(myContext, myStringWriter, "LOG", template); = >Exception 
occurred in target VM: Encountered "" at LOG[line 1, column 93]
Was expecting one of:
    "(" ...
    ")" ...
     ...
    "]]#" ...
     ...
     ...
     ...
     ...
     ...
     ...
     ...
    "{" ...
    "}" ...
    "" ...
    "\\" ...
     ...
     ...
     ...
    "{" ...
    <

If I use the Template "CONSTRAINT 
DF_#if(${archiveTableTemplate})${archiveTableTemplate}#else${table}#end 
__${column}" it works, but the result is wrong. Blank after replacement.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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