The following comment has been added to this issue:
Author: dion gillard
Created: Tue, 13 Apr 2004 8:56 PM
Body:
length will be a Long, and jexl is no good at Long -> int conversion.
Try this:
<j:set var="pwd" value="password" />
<j:set var="verDir"
value="/home/dion/test/files/using/slashes/home/dion/test/files/using/slashes/home/dion/test/files/using/slashes/home/dion/test/files/using/slashes"
/>
<j:set var="length" value="${pwd.length() + 1}" />
<echo>
1: ${ verDir }
2: ${ length }
2a: ${length.class.name}
3: ${ verDir.substring( length.intValue() ) }
4: ${ verDir.substring( 0, length.intValue() ) }
5: ${ verDir.substring( 71 ) }
6: ${ verDir.substring( 0, 71 ) }
---------------------------------------------------------------------
View this comment:
http://jira.codehaus.org/secure/ViewIssue.jspa?key=MAVEN-1234&page=comments#action_18608
---------------------------------------------------------------------
View the issue:
http://jira.codehaus.org/secure/ViewIssue.jspa?key=MAVEN-1234
Here is an overview of the issue:
---------------------------------------------------------------------
Key: MAVEN-1234
Summary: Jelly Execution
Type: Bug
Status: Unassigned
Priority: Major
Original Estimate: Unknown
Time Spent: Unknown
Remaining: Unknown
Project: maven
Assignee:
Reporter: Niclas Hedhman
Created: Tue, 13 Apr 2004 4:22 PM
Updated: Tue, 13 Apr 2004 8:56 PM
Description:
If I do;
<j:set var="length" value="${pwd.length() + 1}" />
<echo>
1: ${ verDir }
2: ${ length }
3: ${ verDir.substring( length ) }
4: ${ verDir.substring( 0, length ) }
5: ${ verDir.substring( 71 ) }
6: ${ verDir.substring( 0, 71 ) }
</echo>
I get the result;
1: /home/niclas/dev/opensource/avalon-sandbox/merlin-test/merlin-jmx-demo/versioning
2: 71
3:
4:
5: versioning
6: /home/niclas/dev/opensource/avalon-sandbox/merlin-test/merlin-jmx-demo/
Why on earths name doesn't substring( length ) work?
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]