Bugs item #952129, was opened at 2004-05-11 22:15
Message generated for change (Comment added) made by fgiust
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=536613&aid=952129&group_id=73068

Category: main tag library
Group: planned for 1.0
>Status: Closed
Resolution: None
Priority: 5
Submitted By: Evan Hughes (hughes)
Assigned to: fabrizio giustina (fgiust)
Summary: column:autolink throwing exception

Initial Comment:
LinkUtil is misbehaving. If an URL is a substring of a
larger block of text, an OutOfBounds error is thrown.
For example: 

Set a chunk of text to be: "A large string of text. Foo
bar. Foo bar. Foo bar. Foo bar. Foo bar. Foo bar. Foo
bar. Foo bar. Foo bar. Foo bar. Foo bar. Foo bar. Foo
bar. Foo bar. Foo bar. Foo bar.  http://foo.bar.";, and
display it with 

-----
<display:table name="sampleProperties">
  <display:column property="key" title="PROPERTY" />
  <display:column property="value" title="VALUE"
autolink="true"/>
</display:table>
-----

Upon display, you should get an exception:

-----
java.lang.StringIndexOutOfBoundsException: String index
out of range: -154
        java.lang.String.substring(String.java:1444)
        org.displaytag.util.LinkUtil.autoLink(LinkUtil.java:111) 
org.displaytag.model.Column.createChoppedAndLinkedValue(Column.java:192)
...
-----

----------------------------------------------------------------------

>Comment By: fabrizio giustina (fgiust)
Date: 2004-05-14 00:06

Message:
Logged In: YES 
user_id=798060

fixed in cvs for rc1 and added testcase

----------------------------------------------------------------------

Comment By: fabrizio giustina (fgiust)
Date: 2004-05-13 16:34

Message:
Logged In: YES 
user_id=798060

The supplied patch makes use of regular expressions: we 
should not have any jdk14/option regexp package 
dependency.
I'll try to fix the current method without regular 
expressions.

Thanks

----------------------------------------------------------------------

Comment By: Evan Hughes (hughes)
Date: 2004-05-11 23:36

Message:
Logged In: YES 
user_id=40084

The attached file is a drop in replacement for the offending
file. 

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=536613&aid=952129&group_id=73068


-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click
_______________________________________________
displaytag-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/displaytag-devel

Reply via email to