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/io/session/ImagerySessionImporter.java

    r8803 r8846  
    4949            AbstractTileSourceLayer tsLayer = (AbstractTileSourceLayer) layer;
    5050            if (attributes.containsKey("automatic-downloading")) {
    51                 tsLayer.autoLoad = Boolean.valueOf(attributes.get("automatic-downloading"));
     51                tsLayer.autoLoad = Boolean.parseBoolean(attributes.get("automatic-downloading"));
    5252            }
    5353
    5454            if (attributes.containsKey("automatically-change-resolution")) {
    55                 tsLayer.autoZoom = Boolean.valueOf(attributes.get("automatically-change-resolution"));
     55                tsLayer.autoZoom = Boolean.parseBoolean(attributes.get("automatically-change-resolution"));
    5656            }
    5757
    5858            if (attributes.containsKey("show-errors")) {
    59                 tsLayer.showErrors = Boolean.valueOf(attributes.get("show-errors"));
     59                tsLayer.showErrors = Boolean.parseBoolean(attributes.get("show-errors"));
    6060            }
    6161        }
Note: See TracChangeset for help on using the changeset viewer.