This is an exported version of the JIRA issue tracker. Please use the Google Code site to open new tickets or report updates to these existing tickets. Feel free to contact the mailing list with any questions.

[TRA-2] Delimiter is shown after last item
Created: Mon, 5 Jul 2004 20:21:12 -0700 (PDT)  Updated: Wed, 22 Sep 2004 19:34:46 -0700 (PDT)

Status:Resolved
Project:Trail-Taglib
Component/s:
Affects Version/s:
Fix Version/s:0.3

Type:BugPriority: Major
Reporter:NoneAssignee:Henri Yandell
Resolution:Fixed 
Environment:all


 Description   
Delimiter is shown after last item.

Fix:

ListTag.java

if(itr.hasNext()) { // Edited by Troy McKinnon: 05-Jul-2004 08:19:09 PM PDT
                buffer.append(this.delimiter);
            }
Comment by bayard [ Wed, 22 Sep 2004 19:26:23 -0700 (PDT) ]
Solution is to add:

if(txt.length() > 0) {
            txt = txt.substring(0, txt.length() - this.delimiter().length() );
        }

to line 91.

However, is this actually a bug or just something which needs to be an optional feature?
Comment by bayard [ Wed, 22 Sep 2004 19:34:46 -0700 (PDT) ]
Fixed by changing the default behaviour to not end with the delimiter, and adding a showEndDelimiter attribute to the tag to allow the old functionality to be regained.

Needs testing.