Changeset 13825 in josm for trunk/src


Ignore:
Timestamp:
2018-05-24T02:08:33+02:00 (15 months ago)
Author:
Don-vip
Message:

SonarQube - squid:S3878 - Arrays should not be created for varargs parameters

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

Legend:

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

    r13824 r13825  
    192192
    193193            if (!GraphicsEnvironment.isHeadless()) {
    194                 if (1 != new ExtendedDialog(Main.parent, tr("Select WMS layers"), new String[]{tr("Add layers"), tr("Cancel")}) { {
     194                if (1 != new ExtendedDialog(Main.parent, tr("Select WMS layers"), tr("Add layers"), tr("Cancel")) { {
    195195                    final JScrollPane scrollPane = new JScrollPane(tree.getLayerTree());
    196196                    scrollPane.setPreferredSize(new Dimension(400, 400));
  • trunk/src/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJob.java

    r13778 r13825  
    277277            if (now > expires) {
    278278                Logging.debug("JCS - Object {0} has expired -> valid to {1}, now is: {2}",
    279                         new Object[]{getUrlNoException(), Long.toString(expires), Long.toString(now)});
     279                        getUrlNoException(), Long.toString(expires), Long.toString(now));
    280280                return false;
    281281            }
     
    376376                    cache.put(getCacheKey(), cacheData, attributes);
    377377                    Logging.debug("JCS - downloaded key: {0}, length: {1}, url: {2}",
    378                             new Object[] {getCacheKey(), raw.length, getUrl()});
     378                            getCacheKey(), raw.length, getUrl());
    379379                    return true;
    380380                } else if (cacheAsEmpty()) {
  • trunk/src/org/openstreetmap/josm/data/imagery/TMSCachedTileLoaderJob.java

    r13744 r13825  
    123123            } catch (IOException e) {
    124124                Logging.logWithStackTrace(Logging.LEVEL_WARN, e, "JCS TMS - error loading from cache for tile {0}: {1}",
    125                         new Object[] {tile.getKey(), e.getMessage()}
    126                         );
     125                        tile.getKey(), e.getMessage());
    127126            }
    128127        }
     
    208207            }
    209208        } catch (IOException e) {
    210             Logging.warn("JCS TMS - error loading object for tile {0}: {1}", new Object[] {tile.getKey(), e.getMessage()});
     209            Logging.warn("JCS TMS - error loading object for tile {0}: {1}", tile.getKey(), e.getMessage());
    211210            tile.setError(e);
    212211            tile.setLoaded(false);
  • trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddImageryPanel.java

    r13756 r13825  
    7777                1
    7878                ));
    79         List<String> units = Arrays.asList(new String[]{tr("seconds"), tr("minutes"), tr("hours"), tr("days")});
     79        List<String> units = Arrays.asList(tr("seconds"), tr("minutes"), tr("hours"), tr("days"));
    8080        minimumCacheExpiryUnit = new JComboBox<>(units.toArray(new String[]{}));
    8181        currentUnit = TimeUnit.SECONDS;
Note: See TracChangeset for help on using the changeset viewer.