Ignore:
Timestamp:
2016-05-11T22:29:43+02:00 (10 years ago)
Author:
Don-vip
Message:

sonar, javadoc

Location:
trunk/src/org/openstreetmap/josm/io
Files:
3 edited

Legend:

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

    r9509 r10194  
    237237        public final int limit;
    238238
     239        /**
     240         * Constructs a {@code MoreNotesException}.
     241         * @param notes downloaded notes
     242         * @param limit download limit sent to the server
     243         */
    239244        public MoreNotesException(List<Note> notes, int limit) {
    240245            this.notes = notes;
     
    242247        }
    243248    }
    244 
    245249}
  • trunk/src/org/openstreetmap/josm/io/CachedFile.java

    r10181 r10194  
    176176    }
    177177
     178    /**
     179     * Returns maximum age of cache file. Only applies to URLs.
     180     * When this time has passed after the last download of the file, the
     181     * cache is considered stale and a new download will be attempted.
     182     * @return the maximum cache age in seconds
     183     */
    178184    public long getMaxAge() {
    179185        return maxAge;
  • trunk/src/org/openstreetmap/josm/io/ChangesetQuery.java

    r10006 r10194  
    2828     * Maximum number of changesets returned by the OSM API call "/changesets?"
    2929     */
    30     public static int MAX_CHANGESETS_NUMBER = 100;
    31 
    32     /**
    33      * Replies a changeset query object from the query part of a OSM API URL for querying changesets.
    34      *
    35      * @param query the query part
    36      * @return the query object
    37      * @throws ChangesetQueryUrlException if query doesn't consist of valid query parameters
    38      */
    39     public static ChangesetQuery buildFromUrlQuery(String query) throws ChangesetQueryUrlException {
    40         return new ChangesetQueryUrlParser().parse(query);
    41     }
     30    public static final int MAX_CHANGESETS_NUMBER = 100;
    4231
    4332    /** the user id this query is restricted to. null, if no restriction to a user id applies */
     
    5645    /** a collection of changeset ids to query for */
    5746    private Collection<Long> changesetIds;
     47
     48    /**
     49     * Replies a changeset query object from the query part of a OSM API URL for querying changesets.
     50     *
     51     * @param query the query part
     52     * @return the query object
     53     * @throws ChangesetQueryUrlException if query doesn't consist of valid query parameters
     54     */
     55    public static ChangesetQuery buildFromUrlQuery(String query) throws ChangesetQueryUrlException {
     56        return new ChangesetQueryUrlParser().parse(query);
     57    }
    5858
    5959    /**
     
    305305    }
    306306
     307    /**
     308     * Exception thrown for invalid changeset queries.
     309     */
    307310    public static class ChangesetQueryUrlException extends Exception {
    308311
     
    339342    }
    340343
     344    /**
     345     * Changeset query URL parser.
     346     */
    341347    public static class ChangesetQueryUrlParser {
    342348        protected int parseUid(String value) throws ChangesetQueryUrlException {
     
    486492         * </pre>
    487493         *
    488          * @param query the query string. If null, an empty query (identical to a query for all changesets) is
    489          * assumed
     494         * @param query the query string. If null, an empty query (identical to a query for all changesets) is assumed
    490495         * @return the changeset query
    491496         * @throws ChangesetQueryUrlException if the query string doesn't represent a legal query for changesets
     
    494499            if (query == null)
    495500                return new ChangesetQuery();
    496             query = query.trim();
    497             if (query.isEmpty())
     501            String apiQuery = query.trim();
     502            if (apiQuery.isEmpty())
    498503                return new ChangesetQuery();
    499             Map<String, String> queryParams = createMapFromQueryString(query);
    500             return createFromMap(queryParams);
     504            return createFromMap(createMapFromQueryString(apiQuery));
    501505        }
    502506    }
Note: See TracChangeset for help on using the changeset viewer.