提交 5e168d74 编写于 作者: D dsamersoff

8068007: [Findbugs] SA com.sun.java.swing.action.ActionManager.manager should be package protect

Summary: fixed java programming style nit
Reviewed-by: dholmes, jbachorik, sspitsyn
上级 e96dc5a0
...@@ -46,6 +46,11 @@ public abstract class ActionManager ...@@ -46,6 +46,11 @@ public abstract class ActionManager
return manager; return manager;
} }
protected static void setInstance(ActionManager m)
{
manager = m;
}
protected abstract void addActions(); protected abstract void addActions();
protected void addAction(String cmdname, Action action) protected void addAction(String cmdname, Action action)
...@@ -90,6 +95,6 @@ public abstract class ActionManager ...@@ -90,6 +95,6 @@ public abstract class ActionManager
private HashMap actions; private HashMap actions;
private static ActionUtilities utilities = new ActionUtilities(); private static ActionUtilities utilities = new ActionUtilities();
protected static ActionManager manager; private static ActionManager manager;
} }
...@@ -32,10 +32,12 @@ import com.sun.java.swing.action.ActionManager; ...@@ -32,10 +32,12 @@ import com.sun.java.swing.action.ActionManager;
public class HSDBActionManager extends ActionManager { public class HSDBActionManager extends ActionManager {
public static ActionManager getInstance() { public static ActionManager getInstance() {
if (manager == null) { ActionManager m = ActionManager.getInstance();
manager = new HSDBActionManager(); if (m == null) {
m = new HSDBActionManager();
ActionManager.setInstance(m);
} }
return manager; return m;
} }
protected void addActions() { protected void addActions() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册