opennlp-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörn Kottmann <kottm...@gmail.com>
Subject Re: svn commit: r1159566 - in /incubator/opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools: chunker/ namefind/ postag/ sentdetect/ tokenize/ util/eval/
Date Fri, 19 Aug 2011 10:07:00 GMT
On 8/19/11 11:54 AM, colen@apache.org wrote:
> +  public Evaluator(List<? extends EvaluationSampleListener<T>>  listeners)
{
>       if(listeners != null) {
>         this.listeners = Collections.unmodifiableList(listeners);
>       }

We need to make a copy here, otherwise a user can still modify the list,
the unmodifiableList only prevents the Evaluator object from changing the
List.

Jörn

Mime
View raw message