Changeset 8423 in josm for trunk


Ignore:
Timestamp:
2015-05-23T20:08:47+02:00 (10 years ago)
Author:
wiktorn
Message:

Fix unit tests and findbugs warning. Closes: #11466

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java

    r8422 r8423  
    10141014            }
    10151015        }
    1016         regactions.put(toolbar, action);
     1016        if (toolbar != null) {
     1017            regactions.put(toolbar, action);
     1018        }
    10171019        return action;
    10181020    }
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/ToolbarPreferencesTest.java

    r7937 r8423  
    1414import org.junit.Test;
    1515import org.openstreetmap.josm.actions.ActionParameter;
     16import org.openstreetmap.josm.actions.ActionParameter.StringActionParameter;
    1617import org.openstreetmap.josm.actions.ParameterizedAction;
    17 import org.openstreetmap.josm.actions.ActionParameter.StringActionParameter;
    1818import org.openstreetmap.josm.gui.preferences.ToolbarPreferences.ActionDefinition;
    1919import org.openstreetmap.josm.gui.preferences.ToolbarPreferences.ActionParser;
     
    6161        checkAction(parser.loadAction("action(param1=value1,"), "param1", "value1");
    6262        checkAction(parser.loadAction("action(param1=value1"), "param1", "value1");
    63         checkAction(parser.loadAction("action(param1="), "param1", "");
    64         checkAction(parser.loadAction("action(param1"), "param1", "");
     63        checkAction(parser.loadAction("action(param1="));
     64        checkAction(parser.loadAction("action(param1"));
    6565        checkAction(parser.loadAction("action("));
    6666        checkAction(parser.loadAction("action"));
Note: See TracChangeset for help on using the changeset viewer.