changeset 7200:db9fdbb055c4

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
author dsamersoff
date Thu, 02 Apr 2015 13:01:27 -0700
parents 6d13c17668d1
children 57a14c3927eb
files agent/src/share/classes/com/sun/java/swing/action/ActionManager.java agent/src/share/classes/sun/jvm/hotspot/ui/action/HSDBActionManager.java
diffstat 2 files changed, 11 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/agent/src/share/classes/com/sun/java/swing/action/ActionManager.java	Fri Aug 15 15:25:24 2014 -0400
+++ b/agent/src/share/classes/com/sun/java/swing/action/ActionManager.java	Thu Apr 02 13:01:27 2015 -0700
@@ -46,6 +46,11 @@
         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 @@
 
     private HashMap actions;
     private static ActionUtilities utilities = new ActionUtilities();
-    protected static ActionManager manager;
+    private static ActionManager manager;
 
 }
--- a/agent/src/share/classes/sun/jvm/hotspot/ui/action/HSDBActionManager.java	Fri Aug 15 15:25:24 2014 -0400
+++ b/agent/src/share/classes/sun/jvm/hotspot/ui/action/HSDBActionManager.java	Thu Apr 02 13:01:27 2015 -0700
@@ -32,10 +32,12 @@
 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() {