Ignore:
Timestamp:
2015-10-10T01:40:42+02:00 (9 years ago)
Author:
Don-vip
Message:

sonar - fb-contrib - minor performance improvements:

  • Method passes constant String of length 1 to character overridden method
  • Method needlessly boxes a boolean constant
  • Method uses iterator().next() on a List to get the first item
  • Method converts String to boxed primitive using excessive boxing
  • Method converts String to primitive using excessive boxing
  • Method creates array using constants
  • Class defines List based fields but uses them like Sets
File:
1 edited

Legend:

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

    r8836 r8846  
    126126                "\tjava -jar josm.jar <options>...\n\n"+
    127127                tr("options")+":\n"+
    128                 "\t--help|-h                                 "+tr("Show this help")+"\n"+
    129                 "\t--geometry=widthxheight(+|-)x(+|-)y       "+tr("Standard unix geometry argument")+"\n"+
    130                 "\t[--download=]minlat,minlon,maxlat,maxlon  "+tr("Download the bounding box")+"\n"+
    131                 "\t[--download=]<URL>                        "+tr("Download the location at the URL (with lat=x&lon=y&zoom=z)")+"\n"+
    132                 "\t[--download=]<filename>                   "+tr("Open a file (any file type that can be opened with File/Open)")+"\n"+
    133                 "\t--downloadgps=minlat,minlon,maxlat,maxlon "+tr("Download the bounding box as raw GPS")+"\n"+
    134                 "\t--downloadgps=<URL>                       "+tr("Download the location at the URL (with lat=x&lon=y&zoom=z) as raw GPS")+"\n"+
    135                 "\t--selection=<searchstring>                "+tr("Select with the given search")+"\n"+
    136                 "\t--[no-]maximize                           "+tr("Launch in maximized mode")+"\n"+
     128                "\t--help|-h                                 "+tr("Show this help")+'\n'+
     129                "\t--geometry=widthxheight(+|-)x(+|-)y       "+tr("Standard unix geometry argument")+'\n'+
     130                "\t[--download=]minlat,minlon,maxlat,maxlon  "+tr("Download the bounding box")+'\n'+
     131                "\t[--download=]<URL>                        "+tr("Download the location at the URL (with lat=x&lon=y&zoom=z)")+'\n'+
     132                "\t[--download=]<filename>                   "+tr("Open a file (any file type that can be opened with File/Open)")+'\n'+
     133                "\t--downloadgps=minlat,minlon,maxlat,maxlon "+tr("Download the bounding box as raw GPS")+'\n'+
     134                "\t--downloadgps=<URL>                       "+tr("Download the location at the URL (with lat=x&lon=y&zoom=z) as raw GPS")+'\n'+
     135                "\t--selection=<searchstring>                "+tr("Select with the given search")+'\n'+
     136                "\t--[no-]maximize                           "+tr("Launch in maximized mode")+'\n'+
    137137                "\t--reset-preferences                       "+tr("Reset the preferences to default")+"\n\n"+
    138138                "\t--load-preferences=<url-to-xml>           "+tr("Changes preferences according to the XML file")+"\n\n"+
     
    155155                        tr("examples")+":\n"+
    156156                        "\tjava -jar josm.jar track1.gpx track2.gpx london.osm\n"+
    157                         "\tjava -jar josm.jar "+OsmUrlToBounds.getURL(43.2, 11.1, 13)+"\n"+
     157                        "\tjava -jar josm.jar "+OsmUrlToBounds.getURL(43.2, 11.1, 13)+'\n'+
    158158                        "\tjava -jar josm.jar london.osm --selection=http://www.ostertag.name/osm/OSM_errors_node-duplicate.xml\n"+
    159159                        "\tjava -jar josm.jar 43.2,11.1,43.4,11.4\n"+
     
    161161                        "\tjava -Djosm.home=/home/user/.josm_dev -jar josm.jar\n"+
    162162                        "\tjava -Xmx1024m -jar josm.jar\n\n"+
    163                         tr("Parameters --download, --downloadgps, and --selection are processed in this order.")+"\n"+
    164                         tr("Make sure you load some data if you use --selection.")+"\n"
     163                        tr("Parameters --download, --downloadgps, and --selection are processed in this order.")+'\n'+
     164                        tr("Make sure you load some data if you use --selection.")+'\n'
    165165                );
    166166    }
     
    212212
    213213        Option(boolean requiresArgument) {
    214             this.name = name().toLowerCase(Locale.ENGLISH).replace("_", "-");
     214            this.name = name().toLowerCase(Locale.ENGLISH).replace('_', '-');
    215215            this.requiresArg = requiresArgument;
    216216        }
Note: See TracChangeset for help on using the changeset viewer.