2006-06-19 Audrius Meskauskas <[EMAIL PROTECTED]>
PR 28035
* java/rmi/server/UID.java (constructor): Synchronized
the whole constructor on the UID class.
Index: UID.java
===================================================================
RCS file: /sources/classpath/classpath/java/rmi/server/UID.java,v
retrieving revision 1.12
diff -u -r1.12 UID.java
--- UID.java 18 Jun 2006 20:57:43 -0000 1.12
+++ UID.java 19 Jun 2006 10:08:41 -0000
@@ -101,16 +101,16 @@
*/
public UID()
{
- time = System.currentTimeMillis();
- unique = machineId;
- if (time > last)
+ synchronized (UID.class)
{
- last = time;
- count = uidCounter = Short.MIN_VALUE;
- }
- else
- {
- synchronized (UID.class)
+ time = System.currentTimeMillis();
+ unique = machineId;
+ if (time > last)
+ {
+ last = time;
+ count = uidCounter = Short.MIN_VALUE;
+ }
+ else
{
if (uidCounter == Short.MAX_VALUE)
{