[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: java.util.Properties -- make it thread-safe?
From: |
Jeff Sturm |
Subject: |
Re: java.util.Properties -- make it thread-safe? |
Date: |
Fri, 15 Feb 2002 09:44:28 -0500 (EST) |
On 15 Feb 2002, Mark Wielaard wrote:
> When javadoc puts a synchronized in the javadoc you can be sure that the
> thread will need to acquire the lock for that object.
Not so. For instance, Java allows overriding a synchronized method with a
non-sychronized one. Relying on the information from javadoc could be
misleading.
Also, the inverse doesn't apply: a method not identified as synchronized
in javadoc may synchronize "this" anyway.
For these reasons, I believe "synchornized" is part of a method's
implementation but not its interface, and I am glad javadoc ignores it.
Jeff
Re: java.util.Properties -- make it thread-safe?, Sascha Brawer, 2002/02/15
Re: java.util.Properties -- make it thread-safe?, Bryce McKinlay, 2002/02/15