Changeset 8375 in josm


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

code style - Method stores return result in local before immediately returning it

Location:
trunk/src/org/openstreetmap/josm
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/QuadBuckets.java

    r8346 r8375  
    171171
    172172        boolean __add_content(T o) {
    173             boolean ret = false;
    174173            // The split_lock will keep two concurrent calls from overwriting content
    175174            if (content == null) {
    176175                content = new ArrayList<>();
    177176            }
    178             ret = content.add(o);
    179             return ret;
     177            return content.add(o);
    180178        }
    181179
     
    229227            QBLevel<T> next = this;
    230228            QBLevel<T> sibling = next.next_sibling();
    231             // Walk back up the tree to find the
    232             // next sibling node.  It may be either
    233             // a leaf or branch.
     229            // Walk back up the tree to find the next sibling node.
     230            // It may be either a leaf or branch.
    234231            while (sibling == null) {
    235232                next = next.parent;
     
    239236                sibling = next.next_sibling();
    240237            }
    241             next = sibling;
    242             return next;
     238            return sibling;
    243239        }
    244240
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMergeModel.java

    r8338 r8375  
    595595        public int getRowCount() {
    596596            int count = Math.max(getMyEntries().size(), getMergedEntries().size());
    597             count = Math.max(count, getTheirEntries().size());
    598             return count;
     597            return Math.max(count, getTheirEntries().size());
    599598        }
    600599
  • trunk/src/org/openstreetmap/josm/gui/io/UploadStrategySelectionPanel.java

    r8332 r8375  
    286286
    287287    protected int getChunkSize() {
    288         int chunkSize;
    289288        try {
    290             chunkSize = Integer.parseInt(tfChunkSize.getText().trim());
    291             return chunkSize;
     289            return Integer.parseInt(tfChunkSize.getText().trim());
    292290        } catch(NumberFormatException e) {
    293291            return UploadStrategySpecification.UNSPECIFIED_CHUNK_SIZE;
  • trunk/src/org/openstreetmap/josm/io/OsmServerWriter.java

    r8291 r8375  
    7474            time_left_str += "0";
    7575        }
    76         time_left_str += Integer.toString(seconds_left);
    77         return time_left_str;
     76        return time_left_str + Integer.toString(seconds_left);
    7877    }
    7978
  • trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java

    r8129 r8375  
    152152            result += "</font>";
    153153        }
    154         result += "&nbsp;</html>";
    155         return result;
     154        return result + "&nbsp;</html>";
    156155    }
    157156
  • trunk/src/org/openstreetmap/josm/tools/TextTagParser.java

    r8285 r8375  
    227227        // Free format
    228228        // a 1 "b" 2 c=3 d 4 e "5"
    229         TextAnalyzer parser = new TextAnalyzer(buf);
    230         tags = parser.getFreeParsedTags();
    231         return tags;
     229        return new TextAnalyzer(buf).getFreeParsedTags();
    232230    }
    233231
  • trunk/src/org/openstreetmap/josm/tools/XmlParsingException.java

    r7937 r8375  
    6161            msg = getClass().getName();
    6262        }
    63         msg = msg + " " + tr("(at line {0}, column {1})", lineNumber, columnNumber);
    64         return msg;
     63        return msg + " " + tr("(at line {0}, column {1})", lineNumber, columnNumber);
    6564    }
    6665
Note: See TracChangeset for help on using the changeset viewer.