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 2008/10/13 01:12:44 UTC
[jira] Created: (VELOCITY-629) Error message for set directive
reports wrong line number
Error message for set directive reports wrong line number
---------------------------------------------------------
Key: VELOCITY-629
URL: https://issues.apache.org/jira/browse/VELOCITY-629
Project: Velocity
Issue Type: Bug
Reporter: Byron Foster
Given the following template:
##
##
#set($list = [1])
#set($x = "$list.get(1)")
The MethodInvocationException that report this error reads:
Invocation of method 'get' in class java.util.ArrayList threw exception java.lang.IndexOutOfBoundsException: Index: 1, Size: 1 at /foo.vm[line 1, column 7]
Which contains an incorrect line number.
--
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-629) Error message for set directive
reports wrong line number
Posted by "Byron Foster (JIRA)" <de...@velocity.apache.org>.
[ https://issues.apache.org/jira/browse/VELOCITY-629?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Byron Foster updated VELOCITY-629:
----------------------------------
Attachment: fix629_3.patch
Doh! thanks for supplying the improved TestCase.
I also snuck in an improvement to the exception message for VELOCITY-627 so that the reported column number is on the offending #foreach parameter. and updated the 627 test case.
> Error message for set directive reports wrong line number
> ---------------------------------------------------------
>
> Key: VELOCITY-629
> URL: https://issues.apache.org/jira/browse/VELOCITY-629
> Project: Velocity
> Issue Type: Bug
> Components: Engine
> Affects Versions: 1.6-beta1
> Reporter: Byron Foster
> Attachments: fix629_3.patch, Velocity629TestCase.java
>
>
> Given the following template:
> ##
> ##
> #set($list = [1])
> #set($x = "$list.get(1)")
> The MethodInvocationException that report this error reads:
> Invocation of method 'get' in class java.util.ArrayList threw exception java.lang.IndexOutOfBoundsException: Index: 1, Size: 1 at /foo.vm[line 1, column 7]
> Which contains an incorrect line number.
--
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-629) Error message for set directive
reports wrong line number
Posted by "Byron Foster (JIRA)" <de...@velocity.apache.org>.
[ https://issues.apache.org/jira/browse/VELOCITY-629?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Byron Foster updated VELOCITY-629:
----------------------------------
Attachment: (was: fix629.patch)
> Error message for set directive reports wrong line number
> ---------------------------------------------------------
>
> Key: VELOCITY-629
> URL: https://issues.apache.org/jira/browse/VELOCITY-629
> Project: Velocity
> Issue Type: Bug
> Components: Engine
> Affects Versions: 1.6-beta1
> Reporter: Byron Foster
> Attachments: fix629_2.patch
>
>
> Given the following template:
> ##
> ##
> #set($list = [1])
> #set($x = "$list.get(1)")
> The MethodInvocationException that report this error reads:
> Invocation of method 'get' in class java.util.ArrayList threw exception java.lang.IndexOutOfBoundsException: Index: 1, Size: 1 at /foo.vm[line 1, column 7]
> Which contains an incorrect line number.
--
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-629) Error message for set directive
reports wrong line number
Posted by "Byron Foster (JIRA)" <de...@velocity.apache.org>.
[ https://issues.apache.org/jira/browse/VELOCITY-629?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Byron Foster updated VELOCITY-629:
----------------------------------
Attachment: (was: fix629_2.patch)
> Error message for set directive reports wrong line number
> ---------------------------------------------------------
>
> Key: VELOCITY-629
> URL: https://issues.apache.org/jira/browse/VELOCITY-629
> Project: Velocity
> Issue Type: Bug
> Components: Engine
> Affects Versions: 1.6-beta1
> Reporter: Byron Foster
> Attachments: fix629_3.patch, Velocity629TestCase.java
>
>
> Given the following template:
> ##
> ##
> #set($list = [1])
> #set($x = "$list.get(1)")
> The MethodInvocationException that report this error reads:
> Invocation of method 'get' in class java.util.ArrayList threw exception java.lang.IndexOutOfBoundsException: Index: 1, Size: 1 at /foo.vm[line 1, column 7]
> Which contains an incorrect line number.
--
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-629) Error message for set directive
reports wrong line number
Posted by "Byron Foster (JIRA)" <de...@velocity.apache.org>.
[ https://issues.apache.org/jira/browse/VELOCITY-629?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Byron Foster updated VELOCITY-629:
----------------------------------
Component/s: Engine
Affects Version/s: 1.6-beta1
> Error message for set directive reports wrong line number
> ---------------------------------------------------------
>
> Key: VELOCITY-629
> URL: https://issues.apache.org/jira/browse/VELOCITY-629
> Project: Velocity
> Issue Type: Bug
> Components: Engine
> Affects Versions: 1.6-beta1
> Reporter: Byron Foster
>
> Given the following template:
> ##
> ##
> #set($list = [1])
> #set($x = "$list.get(1)")
> The MethodInvocationException that report this error reads:
> Invocation of method 'get' in class java.util.ArrayList threw exception java.lang.IndexOutOfBoundsException: Index: 1, Size: 1 at /foo.vm[line 1, column 7]
> Which contains an incorrect line number.
--
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-629) Error message for set directive
reports wrong line number
Posted by "Nathan Bubna (JIRA)" <de...@velocity.apache.org>.
[ https://issues.apache.org/jira/browse/VELOCITY-629?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12639179#action_12639179 ]
Nathan Bubna commented on VELOCITY-629:
---------------------------------------
Hmm. It's not #set that's the issue, i think. That line/col is relative to the start of the string literal. So, the MIE message creator doesn't realize that it was inside of a string literal at the time.
> Error message for set directive reports wrong line number
> ---------------------------------------------------------
>
> Key: VELOCITY-629
> URL: https://issues.apache.org/jira/browse/VELOCITY-629
> Project: Velocity
> Issue Type: Bug
> Components: Engine
> Affects Versions: 1.6-beta1
> Reporter: Byron Foster
>
> Given the following template:
> ##
> ##
> #set($list = [1])
> #set($x = "$list.get(1)")
> The MethodInvocationException that report this error reads:
> Invocation of method 'get' in class java.util.ArrayList threw exception java.lang.IndexOutOfBoundsException: Index: 1, Size: 1 at /foo.vm[line 1, column 7]
> Which contains an incorrect line number.
--
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-629) Error message for set directive
reports wrong line number
Posted by "Byron Foster (JIRA)" <de...@velocity.apache.org>.
[ https://issues.apache.org/jira/browse/VELOCITY-629?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Byron Foster updated VELOCITY-629:
----------------------------------
Attachment: fix629_2.patch
Oops, forgot comments on the last patch
> Error message for set directive reports wrong line number
> ---------------------------------------------------------
>
> Key: VELOCITY-629
> URL: https://issues.apache.org/jira/browse/VELOCITY-629
> Project: Velocity
> Issue Type: Bug
> Components: Engine
> Affects Versions: 1.6-beta1
> Reporter: Byron Foster
> Attachments: fix629_2.patch
>
>
> Given the following template:
> ##
> ##
> #set($list = [1])
> #set($x = "$list.get(1)")
> The MethodInvocationException that report this error reads:
> Invocation of method 'get' in class java.util.ArrayList threw exception java.lang.IndexOutOfBoundsException: Index: 1, Size: 1 at /foo.vm[line 1, column 7]
> Which contains an incorrect line number.
--
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-629) Error message for set directive
reports wrong line number
Posted by "Nathan Bubna (JIRA)" <de...@velocity.apache.org>.
[ https://issues.apache.org/jira/browse/VELOCITY-629?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Nathan Bubna updated VELOCITY-629:
----------------------------------
Attachment: Velocity629TestCase.java
Unfortunately, the patch doesn't account for multi-line string literals. Here's an updated version of your test to show that.
> Error message for set directive reports wrong line number
> ---------------------------------------------------------
>
> Key: VELOCITY-629
> URL: https://issues.apache.org/jira/browse/VELOCITY-629
> Project: Velocity
> Issue Type: Bug
> Components: Engine
> Affects Versions: 1.6-beta1
> Reporter: Byron Foster
> Attachments: fix629_2.patch, Velocity629TestCase.java
>
>
> Given the following template:
> ##
> ##
> #set($list = [1])
> #set($x = "$list.get(1)")
> The MethodInvocationException that report this error reads:
> Invocation of method 'get' in class java.util.ArrayList threw exception java.lang.IndexOutOfBoundsException: Index: 1, Size: 1 at /foo.vm[line 1, column 7]
> Which contains an incorrect line number.
--
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] Resolved: (VELOCITY-629) Error message for set directive
reports wrong line number
Posted by "Nathan Bubna (JIRA)" <de...@velocity.apache.org>.
[ https://issues.apache.org/jira/browse/VELOCITY-629?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Nathan Bubna resolved VELOCITY-629.
-----------------------------------
Resolution: Fixed
Fix Version/s: 1.6
> Error message for set directive reports wrong line number
> ---------------------------------------------------------
>
> Key: VELOCITY-629
> URL: https://issues.apache.org/jira/browse/VELOCITY-629
> Project: Velocity
> Issue Type: Bug
> Components: Engine
> Affects Versions: 1.6-beta1
> Reporter: Byron Foster
> Fix For: 1.6
>
> Attachments: fix629_3.patch, Velocity629TestCase.java
>
>
> Given the following template:
> ##
> ##
> #set($list = [1])
> #set($x = "$list.get(1)")
> The MethodInvocationException that report this error reads:
> Invocation of method 'get' in class java.util.ArrayList threw exception java.lang.IndexOutOfBoundsException: Index: 1, Size: 1 at /foo.vm[line 1, column 7]
> Which contains an incorrect line number.
--
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-629) Error message for set directive
reports wrong line number
Posted by "Byron Foster (JIRA)" <de...@velocity.apache.org>.
[ https://issues.apache.org/jira/browse/VELOCITY-629?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Byron Foster updated VELOCITY-629:
----------------------------------
Attachment: fix629.patch
Here is a swipe at it, This patch goes through the tokens of the string literal and adjusts column and line numbers.
> Error message for set directive reports wrong line number
> ---------------------------------------------------------
>
> Key: VELOCITY-629
> URL: https://issues.apache.org/jira/browse/VELOCITY-629
> Project: Velocity
> Issue Type: Bug
> Components: Engine
> Affects Versions: 1.6-beta1
> Reporter: Byron Foster
> Attachments: fix629.patch
>
>
> Given the following template:
> ##
> ##
> #set($list = [1])
> #set($x = "$list.get(1)")
> The MethodInvocationException that report this error reads:
> Invocation of method 'get' in class java.util.ArrayList threw exception java.lang.IndexOutOfBoundsException: Index: 1, Size: 1 at /foo.vm[line 1, column 7]
> Which contains an incorrect line number.
--
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