Index: /trunk/src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java	(revision 3582)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java	(revision 3583)
@@ -69,7 +69,4 @@
 
     public static class ActionDefinition {
-
-        public static ActionDefinition SEPARATOR = new ActionDefinition(null);
-
         private final Action action;
         private final Map<String, Object> parameters = new HashMap<String, Object>();
@@ -94,4 +91,11 @@
         }
 
+        public boolean isSeparator() {
+            return action == null;
+        }
+
+        public static ActionDefinition getSeparator() {
+            return new ActionDefinition(null);
+        }
     }
 
@@ -207,5 +211,5 @@
     private static class ActionParametersTableModel extends AbstractTableModel {
 
-        private ActionDefinition currentAction = ActionDefinition.SEPARATOR;
+        private ActionDefinition currentAction = ActionDefinition.getSeparator();
 
         public int getColumnCount() {
@@ -214,5 +218,5 @@
 
         public int getRowCount() {
-            if (currentAction == ActionDefinition.SEPARATOR || !(currentAction.getAction() instanceof ParameterizedAction))
+            if (currentAction.isSeparator() || !(currentAction.getAction() instanceof ParameterizedAction))
                 return 0;
             ParameterizedAction pa = (ParameterizedAction)currentAction.getAction();
@@ -286,5 +290,5 @@
                         DefaultMutableTreeNode node = (DefaultMutableTreeNode) selectedAction.getLastPathComponent();
                         if (node.getUserObject() == null) {
-                            selected.add(leadItem++, ActionDefinition.SEPARATOR);
+                            selected.add(leadItem++, ActionDefinition.getSeparator());
                         } else if (node.getUserObject() instanceof Action) {
                             selected.add(leadItem++, new ActionDefinition((Action)node.getUserObject()));
@@ -410,6 +414,6 @@
                     String s;
                     Icon i;
-                    if (value != ActionDefinition.SEPARATOR) {
-                        ActionDefinition action = (ActionDefinition)value;
+                    ActionDefinition action = (ActionDefinition)value;
+                    if (!action.isSeparator()) {
                         s = (String) action.getAction().getValue(Action.NAME);
                         i = (Icon) action.getAction().getValue(Action.SMALL_ICON);
@@ -561,5 +565,5 @@
                         Object obj = node.getUserObject();
                         if (obj == null) {
-                            dragActions.add(ActionDefinition.SEPARATOR);
+                            dragActions.add(ActionDefinition.getSeparator());
                         }
                         else if (obj instanceof Action) {
@@ -642,10 +646,9 @@
             ActionParser parser = new ActionParser(null);
             for (int i = 0; i < selected.size(); ++i) {
-                if (selected.get(i) == ActionDefinition.SEPARATOR) {
-
+                ActionDefinition action = (ActionDefinition)selected.get(i);
+                if (action.isSeparator()) {
                     t.add("|");
-
                 } else {
-                    t.add(parser.saveAction((ActionDefinition)(selected.get(i))));
+                    t.add(parser.saveAction(action));
                 }
             }
@@ -731,5 +734,5 @@
         for (String s : getToolString()) {
             if (s.equals("|")) {
-                result.add(ActionDefinition.SEPARATOR);
+                result.add(ActionDefinition.getSeparator());
             } else {
                 ActionDefinition a = actionParser.loadAction(s);
@@ -761,7 +764,6 @@
 
         for (ActionDefinition action : getDefinedActions()) {
-            if (action == ActionDefinition.SEPARATOR) {
+            if (action.isSeparator()) {
                 control.addSeparator();
-
             } else {
                 Action a = action.getParametrizedAction();
