Ignore:
Timestamp:
2018-05-23T21:03:31+02:00 (7 years ago)
Author:
Don-vip
Message:

SonarQube - fix code style issues

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/imagery/WMSImagery.java

    r13760 r13824  
    4343 */
    4444public class WMSImagery {
    45 
    4645
    4746    private static final String CAPABILITIES_QUERY_STRING = "SERVICE=WMS&REQUEST=GetCapabilities";
     
    120119    }
    121120
    122     private Map<String, String> headers = new ConcurrentHashMap<>();
     121    private final Map<String, String> headers = new ConcurrentHashMap<>();
    123122    private String version = "1.1.1"; // default version
    124123    private String getMapUrl;
    125124    private URL capabilitiesUrl;
    126     private List<String> formats = new ArrayList<>();
     125    private final List<String> formats = new ArrayList<>();
    127126    private List<LayerDetails> layers = new ArrayList<>();
    128127
     
    283282        return buildGetMapUrl(
    284283                getLayers(selectedLayers),
    285                 selectedLayers.stream().map(x -> x.getStyle()).collect(Collectors.toList()),
     284                selectedLayers.stream().map(DefaultLayer::getStyle).collect(Collectors.toList()),
    286285                transparent);
    287286    }
     
    296295    public String buildGetMapUrl(List<LayerDetails> selectedLayers, List<String> selectedStyles, boolean transparent) {
    297296        return buildGetMapUrl(
    298                 selectedLayers.stream().map(x -> x.getName()).collect(Collectors.toList()),
     297                selectedLayers.stream().map(LayerDetails::getName).collect(Collectors.toList()),
    299298                selectedStyles,
    300299                getPreferredFormat(),
     
    504503     */
    505504    public boolean belowWMS130() {
    506         return this.version.equals("1.1.1") || this.version.equals("1.1") || this.version.equals("1.0");
     505        return "1.1.1".equals(version) || "1.1".equals(version) || "1.0".equals(version);
    507506    }
    508507
     
    569568    }
    570569
    571     private Bounds parseBBox(Projection conv, String miny, String minx, String maxy, String maxx) {
     570    private static Bounds parseBBox(Projection conv, String miny, String minx, String maxy, String maxx) {
    572571        if (miny == null || minx == null || maxy == null || maxx == null) {
    573572            return null;
     
    592591    }
    593592
    594     private String normalizeUrl(String serviceUrlStr) throws MalformedURLException {
     593    private static String normalizeUrl(String serviceUrlStr) throws MalformedURLException {
    595594        URL getCapabilitiesUrl = null;
    596595        String ret = null;
     
    683682    }
    684683
    685 
    686684    /**
    687685     * @param defaultLayers default layers that should select layer object
     
    689687     */
    690688    public List<LayerDetails> getLayers(List<DefaultLayer> defaultLayers) {
    691         Collection<String> layerNames = defaultLayers.stream().map(x -> x.getLayerName()).collect(Collectors.toList());
     689        Collection<String> layerNames = defaultLayers.stream().map(DefaultLayer::getLayerName).collect(Collectors.toList());
    692690        return layers.stream()
    693691                .flatMap(LayerDetails::flattened)
Note: See TracChangeset for help on using the changeset viewer.