Changeset 11277 in josm


Ignore:
Timestamp:
2016-11-17T22:45:25+01:00 (7 years ago)
Author:
Don-vip
Message:

sonar - fix recently added warnings

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

Legend:

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

    r11252 r11277  
    5858public class PurgeAction extends JosmAction {
    5959
     60    protected transient OsmDataLayer layer;
     61    protected JCheckBox cbClearUndoRedo;
     62    protected boolean modified;
     63
     64    protected transient Set<OsmPrimitive> toPurge;
     65    /**
     66     * finally, contains all objects that are purged
     67     */
     68    protected transient Set<OsmPrimitive> toPurgeChecked;
     69    /**
     70     * Subset of toPurgeChecked. Marks primitives that remain in the
     71     * dataset, but incomplete.
     72     */
     73    protected transient Set<OsmPrimitive> makeIncomplete;
     74    /**
     75     * Subset of toPurgeChecked. Those that have not been in the selection.
     76     */
     77    protected transient List<OsmPrimitive> toPurgeAdditionally;
     78
    6079    /**
    6180     * Constructs a new {@code PurgeAction}.
     
    6988        putValue("help", HelpUtil.ht("/Action/Purge"));
    7089    }
    71 
    72     protected transient OsmDataLayer layer;
    73     protected JCheckBox cbClearUndoRedo;
    74     protected boolean modified;
    75 
    76     protected transient Set<OsmPrimitive> toPurge;
    77     /**
    78      * finally, contains all objects that are purged
    79      */
    80     protected transient Set<OsmPrimitive> toPurgeChecked;
    81     /**
    82      * Subset of toPurgeChecked. Marks primitives that remain in the
    83      * dataset, but incomplete.
    84      */
    85     protected transient Set<OsmPrimitive> makeIncomplete;
    86     /**
    87      * Subset of toPurgeChecked. Those that have not been in the selection.
    88      */
    89     protected transient List<OsmPrimitive> toPurgeAdditionally;
    9090
    9191    @Override
  • trunk/src/org/openstreetmap/josm/data/imagery/WMTSDefaultLayer.java

    r11257 r11277  
    22package org.openstreetmap.josm.data.imagery;
    33
     4/**
     5 * WMTS default layer.
     6 * @since 11257
     7 */
    48public class WMTSDefaultLayer extends DefaultLayer {
    5     String tileMatrixSet;
     9    private final String tileMatrixSet;
    610
     11    /**
     12     * Constructs a new {@code WMTSDefaultLayer}.
     13     * @param layerName layer name
     14     * @param tileMatrixSet tile matrix set
     15     */
    716    public WMTSDefaultLayer(String layerName, String tileMatrixSet) {
    817        super(layerName);
     
    1019    }
    1120
     21    /**
     22     * Returns the tile matrix set.
     23     * @return the tile matrix set
     24     */
    1225    public String getTileMatrixSet() {
    1326        return tileMatrixSet;
  • trunk/src/org/openstreetmap/josm/data/imagery/WMTSTileSource.java

    r11257 r11277  
    271271     */
    272272    public DefaultLayer userSelectLayer() {
    273         Collection<Entry<String, List<Layer>>> grouppedLayers = groupLayersByName(layers);;
     273        Collection<Entry<String, List<Layer>>> grouppedLayers = groupLayersByName(layers);
    274274
    275275        // if there is only one layer name no point in asking
  • trunk/src/org/openstreetmap/josm/data/osm/BBox.java

    r11272 r11277  
    2626     * Constructs a new (invalid) BBox
    2727     */
    28     public BBox() { }
     28    public BBox() {
     29        // Nothing to do
     30    }
    2931
    3032    /**
  • trunk/src/org/openstreetmap/josm/data/osm/QuadBuckets.java

    r11272 r11277  
    473473        private QBLevel<T> currentNode;
    474474        private int contentIndex;
    475         private Iterator<T> invalidBBoxIterator = invalidBBoxPrimitives.iterator();
     475        private final Iterator<T> invalidBBoxIterator = invalidBBoxPrimitives.iterator();
    476476        boolean fromInvalidBBoxPrimitives;
    477477        QuadBuckets<T> qb;
  • trunk/src/org/openstreetmap/josm/gui/download/DownloadDialog.java

    r11270 r11277  
    5656 */
    5757public class DownloadDialog extends JDialog {
    58     private static IntegerProperty DOWNLOAD_TAB = new IntegerProperty("download.tab", 0);
    59 
    60     private static BooleanProperty DOWNLOAD_AUTORUN = new BooleanProperty("download.autorun", false);
    61     private static BooleanProperty DOWNLOAD_OSM = new BooleanProperty("download.osm", true);
    62     private static BooleanProperty DOWNLOAD_GPS = new BooleanProperty("download.gps", false);
    63     private static BooleanProperty DOWNLOAD_NOTES = new BooleanProperty("download.notes", false);
    64     private static BooleanProperty DOWNLOAD_NEWLAYER = new BooleanProperty("download.newlayer", false);
     58    private static final IntegerProperty DOWNLOAD_TAB = new IntegerProperty("download.tab", 0);
     59
     60    private static final BooleanProperty DOWNLOAD_AUTORUN = new BooleanProperty("download.autorun", false);
     61    private static final BooleanProperty DOWNLOAD_OSM = new BooleanProperty("download.osm", true);
     62    private static final BooleanProperty DOWNLOAD_GPS = new BooleanProperty("download.gps", false);
     63    private static final BooleanProperty DOWNLOAD_NOTES = new BooleanProperty("download.notes", false);
     64    private static final BooleanProperty DOWNLOAD_NEWLAYER = new BooleanProperty("download.newlayer", false);
    6565
    6666    /** the unique instance of the download dialog */
  • trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java

    r11261 r11277  
    357357        data.addDataSetListener(MultipolygonCache.getInstance());
    358358        DataSet.addSelectionListener(this);
    359         if (name != null && name.startsWith(createLayerName(""))
    360                 && Character.isDigit((name.substring(createLayerName("").length()) + "XX" /*avoid StringIndexOutOfBoundsException*/).charAt(1))) {
     359        if (name != null && name.startsWith(createLayerName("")) && Character.isDigit(
     360                (name.substring(createLayerName("").length()) + "XX" /*avoid StringIndexOutOfBoundsException*/).charAt(1))) {
    361361            while (AlphanumComparator.getInstance().compare(createLayerName(dataLayerCounter), name) < 0) {
    362362                final int i = dataLayerCounter.incrementAndGet();
  • trunk/src/org/openstreetmap/josm/tools/DefaultGeoProperty.java

    r11264 r11277  
    4040    public Boolean get(BBox box) {
    4141        Area abox = new Area(box.toRectangle());
    42         Geometry.PolygonIntersection is = Geometry.polygonIntersection(abox, area, 1e-10 /* using deg and not meters */ );
     42        Geometry.PolygonIntersection is = Geometry.polygonIntersection(abox, area, 1e-10 /* using deg and not meters */);
    4343        switch (is) {
    4444            case FIRST_INSIDE_SECOND:
  • trunk/src/org/openstreetmap/josm/tools/HttpClient.java

    r11250 r11277  
    191191        private boolean uncompress;
    192192        private boolean uncompressAccordingToContentDisposition;
    193         private String responseData = null;
     193        private String responseData;
    194194
    195195        private Response(HttpURLConnection connection, ProgressMonitor monitor) throws IOException {
Note: See TracChangeset for help on using the changeset viewer.