Ignore:
Timestamp:
2015-05-17T03:24:57+02:00 (9 years ago)
Author:
Don-vip
Message:

code style - remove useless calls to toString()

Location:
trunk/src/org/openstreetmap/josm/gui
Files:
13 edited

Legend:

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

    r7434 r8376  
    178178            URL u = getClass().getResource(im);
    179179            if (u != null) {
    180                 m.appendReplacement(sb, Matcher.quoteReplacement("src=\"" + u.toString() + "\""));
     180                m.appendReplacement(sb, Matcher.quoteReplacement("src=\"" + u + "\""));
    181181            }
    182182        }
  • trunk/src/org/openstreetmap/josm/gui/PleaseWaitDialog.java

    r8308 r8376  
    3232    private final JProgressBar progressBar = new JProgressBar();
    3333
    34     public final JLabel currentAction = new JLabel("");
     34    private final JLabel currentAction = new JLabel("");
    3535    private final JLabel customText = new JLabel("");
    3636    public final transient BoundedRangeModel progress = progressBar.getModel();
  • trunk/src/org/openstreetmap/josm/gui/dialogs/MapPaintDialog.java

    r8323 r8376  
    643643            p.add(new JScrollPane(txtErrors), GBC.std().fill());
    644644            for (Throwable t : s.getErrors()) {
    645                 txtErrors.append(t.toString() + "\n");
     645                txtErrors.append(t + "\n");
    646646            }
    647647        }
  • trunk/src/org/openstreetmap/josm/gui/io/UploadLayerTask.java

    r8291 r8376  
    140140        } catch (Exception sxe) {
    141141            if (isCanceled()) {
    142                 Main.info("Ignoring exception caught because upload is canceled. Exception is: " + sxe.toString());
     142                Main.info("Ignoring exception caught because upload is canceled. Exception is: " + sxe);
    143143                return;
    144144            }
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java

    r8373 r8376  
    804804
    805805                if (toDelete.getFile().delete()) {
    806                     Main.info("File "+toDelete.getFile().toString()+" deleted. ");
     806                    Main.info("File "+toDelete.getFile()+" deleted. ");
    807807                } else {
    808808                    JOptionPane.showMessageDialog(
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ThumbsLoader.java

    r8285 r8376  
    5959
    6060    private BufferedImage loadThumb(ImageEntry entry) {
    61         final String cacheIdent = entry.getFile().toString()+":"+maxSize;
     61        final String cacheIdent = entry.getFile()+":"+maxSize;
    6262
    6363        if (!cacheOff) {
  • trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/WebMarker.java

    r8056 r8376  
    2424 *
    2525 * @author Frederik Ramm
    26  *
     26 * @since 200
    2727 */
    2828public class WebMarker extends ButtonMarker {
     
    3636    }
    3737
    38     @Override public void actionPerformed(ActionEvent ev) {
     38    @Override
     39    public void actionPerformed(ActionEvent ev) {
    3940        String error = OpenBrowser.displayUrl(webUrl.toString());
    4041        if (error != null) {
     
    4243            new Notification(
    4344                    "<b>" + tr("There was an error while trying to display the URL for this marker") + "</b><br>" +
    44                                   tr("(URL was: ") + webUrl.toString() + ")" + "<br>" + error)
     45                                  tr("(URL was: ") + webUrl + ")" + "<br>" + error)
    4546                    .setIcon(JOptionPane.ERROR_MESSAGE)
    4647                    .setDuration(Notification.TIME_LONG)
  • trunk/src/org/openstreetmap/josm/gui/mappaint/Cascade.java

    r8338 r8376  
    213213                res.append(Utils.toString((Color)val));
    214214            } else if (val != null) {
    215                 res.append(val.toString());
     215                res.append(val);
    216216            }
    217217            res.append("; ");
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/LiteralExpression.java

    r8285 r8376  
    2828            return Arrays.toString((float[]) literal);
    2929        }
    30         return "<" + literal.toString() + ">";
     30        return "<" + literal + ">";
    3131    }
    3232}
  • trunk/src/org/openstreetmap/josm/gui/preferences/advanced/ListListEditor.java

    r8308 r8376  
    118118        @Override
    119119        public String getElementAt(int index) {
    120             return (index+1) + ": " + data.get(index).toString();
     120            return (index+1) + ": " + data.get(index);
    121121        }
    122122
  • trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetSelector.java

    r8338 r8376  
    206206        @Override
    207207        public String toString() {
    208             return classification + " " + preset.toString();
     208            return classification + " " + preset;
    209209        }
    210210    }
  • trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionListItem.java

    r8291 r8376  
    8585    }
    8686
    87     @Override public String toString() {
     87    @Override
     88    public String toString() {
    8889        StringBuilder sb = new StringBuilder();
    8990        sb.append("<val='");
    9091        sb.append(value);
    9192        sb.append("',");
    92         sb.append(priority.toString());
     93        sb.append(priority);
    9394        sb.append(">");
    9495        return sb.toString();
    9596    }
    9697
    97     @Override public int hashCode() {
     98    @Override
     99    public int hashCode() {
    98100        final int prime = 31;
    99101        int result = 1;
     
    104106    }
    105107
    106     @Override public boolean equals(Object obj) {
     108    @Override
     109    public boolean equals(Object obj) {
    107110        if (this == obj)
    108111            return true;
  • trunk/src/org/openstreetmap/josm/gui/widgets/MultiSplitLayout.java

    r8345 r8376  
    11131113        @Override
    11141114        public String toString() {
    1115             return "MultiSplitLayout.Divider " + getBounds().toString();
     1115            return "MultiSplitLayout.Divider " + getBounds();
    11161116        }
    11171117    }
Note: See TracChangeset for help on using the changeset viewer.