Changeset 22

Show
Ignore:
Timestamp:
08/19/05 14:07:57 (3 years ago)
Author:
schst
Message:

Factory methods need to be synchronized

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/net/schst/EventDispatcher/EventDispatcher.java

    r21 r22  
    4242    * @return   EventDispatcher object 
    4343    */ 
    44     public static EventDispatcher getInstance() { 
     44    synchronized public static EventDispatcher getInstance() { 
    4545        return EventDispatcher.getInstance("__default"); 
    4646    } 
     
    5353    * @return       EventDispatcher object 
    5454    */ 
    55     public static EventDispatcher getInstance(String name) { 
     55    synchronized public static EventDispatcher getInstance(String name) { 
    5656        if (!EventDispatcher.instances.containsKey(name)) { 
    5757            EventDispatcher.instances.put(name, new EventDispatcher());