On 02/08/2011 02:11, Christopher Schultz wrote: >> > public HTMLEncoder() { mapChar2HTMLEntity= new HashMap(); int >> > longueur = characters.length; >> > >> > for (int i = 0; i < longueur; i++) mapChar2HTMLEntity.put(new >> > Character(characters[i]), entities[i]); } > So you have Character -> String (entity reference). Your Map is not > synchronized, but it doesn't have to be: you are only calling get() on > it so there shouldn't be any synchronization issues here.
The static 'mapChar2HTMLEntity' field is re-initialised each time a new instance is created. If a read event is occurring in another thread at the same time, what will happen? p --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org