classpath
[Top][All Lists]
Advanced

[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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]