Ignore:
Timestamp:
2013-07-26T17:28:24+02:00 (11 years ago)
Author:
Don-vip
Message:

see #8902 - string.equals("") => string.isEmpty() (patch by shinigami)

Location:
trunk/src/org/openstreetmap/josm/actions
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/ImageryAdjustAction.java

    r5962 r6087  
    238238        @Override
    239239        protected void buttonAction(int buttonIndex, ActionEvent evt) {
    240             if (buttonIndex == 0 && tBookmarkName.getText() != null && !"".equals(tBookmarkName.getText()) &&
     240            if (buttonIndex == 0 && tBookmarkName.getText() != null && !tBookmarkName.getText().isEmpty() &&
    241241                    OffsetBookmark.getBookmarkByName(layer, tBookmarkName.getText()) != null) {
    242242                if (!confirmOverwriteBookmark()) return;
     
    252252            if (getValue() != 1) {
    253253                layer.setOffset(oldDx, oldDy);
    254             } else if (tBookmarkName.getText() != null && !"".equals(tBookmarkName.getText())) {
     254            } else if (tBookmarkName.getText() != null && !tBookmarkName.getText().isEmpty()) {
    255255                OffsetBookmark.bookmarkOffset(tBookmarkName.getText(), layer);
    256256            }
  • trunk/src/org/openstreetmap/josm/actions/Map_Rectifier_WMSmenuAction.java

    r6069 r6087  
    126126            // If the contents match, they will be inserted into the text field and the corresponding
    127127            // service will be pre-selected.
    128             if(!clip.equals("") && tfWmsUrl.getText().equals("")
     128            if(!clip.isEmpty() && tfWmsUrl.getText().isEmpty()
    129129                    && (s.urlRegEx.matcher(clip).find() || s.idValidator.matcher(clip).matches())) {
    130130                serviceBtn.setSelected(true);
     
    133133            s.btn = serviceBtn;
    134134            group.add(serviceBtn);
    135             if(!s.url.equals("")) {
     135            if(!s.url.isEmpty()) {
    136136                panel.add(serviceBtn, GBC.std());
    137137                panel.add(new UrlLabel(s.url, tr("Visit Homepage")), GBC.eol().anchor(GridBagConstraints.EAST));
     
    142142
    143143        // Fallback in case no match was found
    144         if(tfWmsUrl.getText().equals("") && firstBtn != null) {
     144        if(tfWmsUrl.getText().isEmpty() && firstBtn != null) {
    145145            firstBtn.setSelected(true);
    146146        }
     
    175175                // We've reached the custom WMS URL service
    176176                // Just set the URL and hope everything works out
    177                 if(s.wmsUrl.equals("")) {
     177                if(s.wmsUrl.isEmpty()) {
    178178                    addWMSLayer(s.name + " (" + text + ")", text);
    179179                    break outer;
  • trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java

    r5909 r6087  
    680680        @Override public boolean match(OsmPrimitive osm) {
    681681            if (!osm.hasKeys() && osm.getUser() == null)
    682                 return search.equals("");
     682                return search.isEmpty();
    683683
    684684            for (String key: osm.keySet()) {
Note: See TracChangeset for help on using the changeset viewer.