Changeset 14099 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2018-08-05T23:22:33+02:00 (6 years ago)
Author:
Don-vip
Message:

fix sonarqube issues

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

Legend:

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

    r14087 r14099  
    272272    @FunctionalInterface
    273273    protected interface ParserWorker {
    274        void accept(InputStreamReader ir) throws IllegalDataException, IOException;
     274        /**
     275         * Effectively parses the file, depending on the format (XML, JSON, etc.)
     276         * @param ir input stream reader
     277         * @throws IllegalDataException in case of invalid data
     278         * @throws IOException in case of I/O error
     279         */
     280        void accept(InputStreamReader ir) throws IllegalDataException, IOException;
    275281    }
    276282
     
    550556    @FunctionalInterface
    551557    protected interface CommonReader {
    552        void accept(PrimitiveData pd) throws IllegalDataException;
     558        /**
     559         * Reads the common primitive attributes and sets them in {@code pd}
     560         * @param pd primitive data to update
     561         * @throws IllegalDataException in case of invalid data
     562         */
     563        void accept(PrimitiveData pd) throws IllegalDataException;
    553564    }
    554565
    555566    @FunctionalInterface
    556567    protected interface NodeReader {
    557        void accept(Node n) throws IllegalDataException;
     568        /**
     569         * Reads the node tags.
     570         * @param n node
     571         * @throws IllegalDataException in case of invalid data
     572         */
     573        void accept(Node n) throws IllegalDataException;
    558574    }
    559575
    560576    @FunctionalInterface
    561577    protected interface WayReader {
    562        void accept(Way w, Collection<Long> nodeIds) throws IllegalDataException;
     578        /**
     579         * Reads the way nodes and tags.
     580         * @param w way
     581         * @param nodeIds collection of resulting node ids
     582         * @throws IllegalDataException in case of invalid data
     583         */
     584        void accept(Way w, Collection<Long> nodeIds) throws IllegalDataException;
    563585    }
    564586
    565587    @FunctionalInterface
    566588    protected interface RelationReader {
    567        void accept(Relation r, Collection<RelationMemberData> members) throws IllegalDataException;
     589        /**
     590         * Reads the relation members and tags.
     591         * @param r relation
     592         * @param members collection of resulting members
     593         * @throws IllegalDataException in case of invalid data
     594         */
     595        void accept(Relation r, Collection<RelationMemberData> members) throws IllegalDataException;
    568596    }
    569597
  • trunk/src/org/openstreetmap/josm/io/OsmJsonReader.java

    r14086 r14099  
    121121    }
    122122
    123     private void readTags(JsonObject item, Tagged t) {
     123    private static void readTags(JsonObject item, Tagged t) {
    124124        JsonObject tags = item.getJsonObject("tags");
    125125        if (tags != null) {
Note: See TracChangeset for help on using the changeset viewer.