[ 
https://issues.apache.org/jira/browse/TEXT-219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17618872#comment-17618872
 ] 

Jaap Sperling commented on TEXT-219:
------------------------------------

Thanks. just wanted to raise this issue because a) it broke my build and b) the 
documentation for the method states (implies at least to me) that the returend 
List is modifiable.

I just wrapped the result into an ArrayList and was done with it. Maybe just 
update the Javadoc?

> StringTokenizer#getTokenList does not support #remove
> -----------------------------------------------------
>
>                 Key: TEXT-219
>                 URL: https://issues.apache.org/jira/browse/TEXT-219
>             Project: Commons Text
>          Issue Type: Bug
>    Affects Versions: 1.10.0
>            Reporter: Jaap Sperling
>            Priority: Major
>
> Upgraded to 1.10 from 1.9 and the {{StringTokenizer#getTokenList}} method now 
> returns an {{Arrays$ArrayList}} instead of a regular {{{}ArrayList{}}}.
> This causes calls to #add and #remove to throw 
> UnsupportedOperationExceptions, even if the documentation states this returns 
> modifiable lists



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to