Ignore:
Timestamp:
2013-09-27T01:16:28+02:00 (7 years ago)
Author:
Don-vip
Message:

Sonar/FindBugs - Performance - Method concatenates strings using + in a loop

File:
1 edited

Legend:

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

    r6245 r6264  
    156156     */
    157157    public String findSummaryDocumentation() {
    158         String result = "<table>";
     158        StringBuilder result = new StringBuilder("<table>");
    159159        for (Class<? extends DownloadTask> taskClass : downloadTasks) {
    160160            if (taskClass != null) {
    161161                try {
    162162                    DownloadTask task = taskClass.getConstructor().newInstance();
    163                     result += task.acceptsDocumentationSummary();
     163                    result.append(task.acceptsDocumentationSummary());
    164164                } catch (Exception e) {
    165165                    e.printStackTrace();
     
    167167            }
    168168        }
    169         result += "</table>";
    170         return result;
     169        result.append("</table>");
     170        return result.toString();
    171171    }
    172172
Note: See TracChangeset for help on using the changeset viewer.