diff --git a/agent/src/share/classes/com/sun/java/swing/action/ActionManager.java b/agent/src/share/classes/com/sun/java/swing/action/ActionManager.java index 751d4a63114d4d6022298fb6e94e42bcb566bde1..7da5b6534caa5d7907e11cd7af9a5659d24a5a28 100644 --- a/agent/src/share/classes/com/sun/java/swing/action/ActionManager.java +++ b/agent/src/share/classes/com/sun/java/swing/action/ActionManager.java @@ -46,6 +46,11 @@ public abstract class ActionManager return manager; } + protected static void setInstance(ActionManager m) + { + manager = m; + } + protected abstract void addActions(); protected void addAction(String cmdname, Action action) @@ -90,6 +95,6 @@ public abstract class ActionManager private HashMap actions; private static ActionUtilities utilities = new ActionUtilities(); - protected static ActionManager manager; + private static ActionManager manager; } diff --git a/agent/src/share/classes/sun/jvm/hotspot/ui/action/HSDBActionManager.java b/agent/src/share/classes/sun/jvm/hotspot/ui/action/HSDBActionManager.java index f234231e3630d8cd272e2b3e2b490f280daef20d..1ebcb1b38823ff8c9bfe2fc30a08ec76abc8912d 100644 --- a/agent/src/share/classes/sun/jvm/hotspot/ui/action/HSDBActionManager.java +++ b/agent/src/share/classes/sun/jvm/hotspot/ui/action/HSDBActionManager.java @@ -32,10 +32,12 @@ import com.sun.java.swing.action.ActionManager; public class HSDBActionManager extends ActionManager { public static ActionManager getInstance() { - if (manager == null) { - manager = new HSDBActionManager(); + ActionManager m = ActionManager.getInstance(); + if (m == null) { + m = new HSDBActionManager(); + ActionManager.setInstance(m); } - return manager; + return m; } protected void addActions() {