bval-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Struberg <strub...@yahoo.de.INVALID>
Subject copy annotations in multithreaded environments
Date Sat, 22 Oct 2016 08:59:53 GMT
Hi!

Just stumbled across the following code which is not thread safe. Do we need this? 
Or can we assume that this happens in a single thread anyway?

public void addAnnotation(final Annotation annotation) {
this.annotations = ArrayUtils.add(annotations, annotation);
}

LieGrue,
strub
Mime
View raw message