Changeset 34656 in osm for applications/editors/josm


Ignore:
Timestamp:
2018-09-15T14:21:41+02:00 (6 years ago)
Author:
donvip
Message:

fix UnnecessaryParentheses warnings

Location:
applications/editors/josm/plugins/CommandLine/src/org/openstreetmap/josm/plugins/commandline
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/CommandLine/src/org/openstreetmap/josm/plugins/commandline/Command.java

    r34574 r34656  
    140140            if (obj instanceof String) {
    141141                if (parameter.getRawValue() instanceof Relay) {
    142                     if (((Relay) (parameter.getRawValue())).isCorrectValue((String) obj))
     142                    if (((Relay) parameter.getRawValue()).isCorrectValue((String) obj))
    143143                        return true;
    144144                }
  • applications/editors/josm/plugins/CommandLine/src/org/openstreetmap/josm/plugins/commandline/CommandLine.java

    r34574 r34656  
    148148
    149149    private void loadCommands() {
    150         commands = (new Loader(getPluginDirs().getUserDataDirectory(false))).load();
     150        commands = new Loader(getPluginDirs().getUserDataDirectory(false)).load();
    151151        if (commands.isEmpty()) {
    152152            if (!GraphicsEnvironment.isHeadless() && JOptionPane.YES_OPTION == JOptionPane.showConfirmDialog(MainApplication.getMainFrame(),
     
    155155                try {
    156156                    downloadAndInstallDefaultCommands();
    157                     commands = (new Loader(getPluginDirs().getUserDataDirectory(false))).load();
     157                    commands = new Loader(getPluginDirs().getUserDataDirectory(false)).load();
    158158                    JOptionPane.showMessageDialog(MainApplication.getMainFrame(), tr("Default commands have been successfully installed"),
    159159                            tr("Success"), JOptionPane.INFORMATION_MESSAGE);
     
    232232            prefix = tr(currentParameter.description == null ? currentParameter.name : currentParameter.description);
    233233            if (currentParameter.getRawValue() instanceof Relay)
    234                 prefix = prefix + " (" + ((Relay) (currentParameter.getRawValue())).getOptionsString() + ")";
     234                prefix = prefix + " (" + ((Relay) currentParameter.getRawValue()).getOptionsString() + ")";
    235235            prefix += commandSymbol;
    236236            String value = currentParameter.getValue();
  • applications/editors/josm/plugins/CommandLine/src/org/openstreetmap/josm/plugins/commandline/Loader.java

    r34574 r34656  
    117117    @Override
    118118    public void characters(char[] ch, int start, int length) {
    119         String text = (new String(ch, start, length)).trim();
     119        String text = new String(ch, start, length).trim();
    120120        if (currentParameter != null) {
    121121            if (currentTag.equals("name")) {
  • applications/editors/josm/plugins/CommandLine/src/org/openstreetmap/josm/plugins/commandline/OsmToCmd.java

    r34574 r34656  
    111111                        return;
    112112                    }
    113                     if (!(v.equals("0.6"))) {
     113                    if (!v.equals("0.6")) {
    114114                        throwException(tr("Unsupported version: {0}", v));
    115115                        return;
  • applications/editors/josm/plugins/CommandLine/src/org/openstreetmap/josm/plugins/commandline/Relay.java

    r34574 r34656  
    2525    public void addValue(String value) {
    2626        String letter = null;
    27         if (!(options.containsValue(value))) {
     27        if (!options.containsValue(value)) {
    2828            int i = 0;
    2929            for (; i < value.length(); i++) {
Note: See TracChangeset for help on using the changeset viewer.