Jörn Huxhorn wrote:
> Yes, definitely @ synchronized(statusList). > I just think that > public synchronized List<Status> getCopyOfStatusList() > should be > public List<Status> getCopyOfStatusList() > so there is no risk of deadlock. Oh yes, I was just not seeing the "synchronized" keyword on the method signature. It should not be there. > I haven't checked if there *is* a risk of deadlock but there *could* be > under certain circumstances, i.e. if there would be another place that > synchronizes on statusList first and on Object later. I don't think there is > such a piece of code but it's generally a good idea to not > synchronize/holding two locks if not absolutely necessary. It's also a bit > faster. Thank you for taking the time to go over this so cool-headedly. I really appreciate it. > Joern. -- Ceki Gülcü _______________________________________________ logback-dev mailing list [email protected] http://qos.ch/mailman/listinfo/logback-dev
