Changeset 8401 in josm


Ignore:
Timestamp:
2015-05-20T02:46:51+02:00 (10 years ago)
Author:
Don-vip
Message:

fix some minor Sonar issues

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

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJob.java

    r8397 r8401  
    6363
    6464    public static class LIFOQueue extends LinkedBlockingDeque<Runnable> {
     65
     66        /**
     67         * Constructs a new {@code LIFOQueue} with a capacity of {@link Integer#MAX_VALUE}.
     68         */
    6569        public LIFOQueue() {
    6670            super();
    6771        }
    6872
     73        /**
     74         * Constructs a new {@code LIFOQueue} with the given (fixed) capacity.
     75         * @param capacity the capacity of this deque
     76         * @throws IllegalArgumentException if {@code capacity} is less than 1
     77         */
    6978        public LIFOQueue(int capacity) {
    7079            super(capacity);
     
    8392
    8493
    85     /*
     94    /**
    8695     * ThreadPoolExecutor starts new threads, until THREAD_LIMIT is reached. Then it puts tasks into LIFOQueue, which is fairly
    8796     * small, but we do not want a lot of outstanding tasks queued, but rather prefer the class consumer to resubmit the task, which are
  • trunk/src/org/openstreetmap/josm/data/validation/tests/RelationChecker.java

    r8382 r8401  
    305305
    306306                    errors.add(new TestError(this, Severity.WARNING, ROLE_VERIF_PROBLEM_MSG,
    307                             tr(s, key, templates.toString()), MessageFormat.format(s, key), ROLE_UNKNOWN, n));
     307                            tr(s, key, templates), MessageFormat.format(s, key), ROLE_UNKNOWN, n));
    308308                } else {
    309309                    String s = marktr("Empty role type found when expecting one of {0}");
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/PasteTagsConflictResolverDialog.java

    r8388 r8401  
    6464    private boolean canceled = false;
    6565
    66     private ImageIcon iconResolved;
    67     private ImageIcon iconUnresolved;
     66    private final ImageIcon iconResolved;
     67    private final ImageIcon iconUnresolved;
    6868    private StatisticsTableModel statisticsModel;
    6969    private JPanel pnlTagResolver;
     
    306306            } else {
    307307                boolean enabled = true;
    308                 for (OsmPrimitiveType type: resolvers.keySet()) {
    309                     enabled &= resolvers.get(type).getModel().isResolvedCompletely();
     308                for (TagConflictResolver val: resolvers.values()) {
     309                    enabled &= val.getModel().isResolvedCompletely();
    310310                }
    311311                setEnabled(enabled);
  • trunk/src/org/openstreetmap/josm/gui/layer/TMSLayer.java

    r8397 r8401  
    554554        tileOptionMenu.add(new JMenuItem(new AbstractAction(
    555555                tr("Request Update")) {
     556            @Override
    556557            public void actionPerformed(ActionEvent ae) {
    557558                if (clickedTile != null) {
     
    10801081
    10811082    private final TileSet nullTileSet = new TileSet((LatLon)null, (LatLon)null, 0);
    1082     private class TileSet {
     1083    private final class TileSet {
    10831084        private int x0, x1, y0, y1;
    10841085        private int zoom;
  • trunk/src/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreference.java

    r8392 r8401  
    883883                case 0:
    884884                    if (info.projectionCode == null) return "";
    885                     return info.projectionCode.toString();
     885                    return info.projectionCode;
    886886                case 1:
    887887                    return info.layerName;
  • trunk/src/org/openstreetmap/josm/io/CachedFile.java

    r8390 r8401  
    7777     *  <li>relative or absolute file name</li>
    7878     *  <li>{@code file:///SOME/FILE} the same as above</li>
    79      *  <li>{@code http://...} a URL. It will be cached on disk.</li></ul>
     79     *  <li>{@code http://...} a URL. It will be cached on disk.</li>
    8080     *  <li>{@code resource://SOME/FILE} file from the classpath (usually in the current *.jar)</li>
    81      *  <li>{@code josmdir://SOME/FILE} file inside josm user data directory (since r7058)</li></ul>
     81     *  <li>{@code josmdir://SOME/FILE} file inside josm user data directory (since r7058)</li>
    8282     *  <li>{@code josmplugindir://SOME/FILE} file inside josm plugin directory (since r7834)</li></ul>
    8383     */
     
    9191     *  <li>relative or absolute file name</li>
    9292     *  <li>{@code file:///SOME/FILE} the same as above</li>
    93      *  <li>{@code http://...} a URL. It will be cached on disk.</li></ul>
     93     *  <li>{@code http://...} a URL. It will be cached on disk.</li>
    9494     *  <li>{@code resource://SOME/FILE} file from the classpath (usually in the current *.jar)</li>
    95      *  <li>{@code josmdir://SOME/FILE} file inside josm user data directory (since r7058)</li></ul>
     95     *  <li>{@code josmdir://SOME/FILE} file inside josm user data directory (since r7058)</li>
    9696     *  <li>{@code josmplugindir://SOME/FILE} file inside josm plugin directory (since r7834)</li></ul>
    9797     * @return this object
Note: See TracChangeset for help on using the changeset viewer.