Ignore:
Timestamp:
2024-04-19T16:21:11+02:00 (4 weeks ago)
Author:
taylor.smock
Message:

Dependency updates

ivy.xml

  • org.eclipse.parsson:parsson: 1.1.5 -> 1.1.6
  • org.apache.commons:commons-compress: 1.25.0 -> 1.26.1
    • Note: This deprecated some functions
  • ch.poole:OpeningHoursParser: 0.28.1 -> 0.28.2
  • org.jacoco:org.jacoco.ant: 0.8.11 -> 0.8.12
  • com.github.spotbugs:spotbugs-annotations: 4.8.3 -> 4.8.4
  • com.github.tomakehurst:wiremock: 2.35.0 -> 3.0.1
  • io.github.classgraph:classgraph: 4.8.165 -> 4.8.171
  • nl.jqno.equalsverifier:equalsverifier: 3.15.6 -> 3.16.1
  • org.awaitility:awaitility: 4.2.0 -> 4.2.1

tools/ivy.xml

  • com.puppycrawl.tools:checkstyle: 9.3 -> 10.15.0
  • com.github.spotbugs:spotbugs: 4.8.3 -> 4.8.4
  • com.google.errorprone: 2.(10.0|24.1) -> 2.26.1
  • net.sourceforge.pmd:pmd was not updated to 7.0.0 due to a significant number of false positives.

There were some additional changes to cleanup new warnings and remove some
additional Java 8 files. There are more warnings that need to be cleaned up.

File:
1 edited

Legend:

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

    r17712 r19048  
    5252     * Reads both API style and planet dump style formats.
    5353     */
    54     private class Parser extends DefaultHandler {
     54    private final class Parser extends DefaultHandler {
    5555
    5656        private NoteParseMode parseMode;
     
    7373        public void startElement(String uri, String localName, String qName, Attributes attrs) throws SAXException {
    7474            buffer.setLength(0);
    75             switch(qName) {
     75            switch (qName) {
    7676            case "osm":
    7777                parseMode = NoteParseMode.API;
     
    9292
    9393            //The rest only applies for dump mode
    94             switch(qName) {
     94            switch (qName) {
    9595            case "note":
    9696                thisNote = parseNoteFull(attrs);
     
    113113            }
    114114            if ("comment".equals(qName)) {
    115                 User commentUser = User.createOsmUser(commentUid, commentUsername);
     115                final User commentUser;
    116116                if (commentUid == 0) {
    117117                    commentUser = User.getAnonymous();
     118                } else {
     119                    commentUser = User.createOsmUser(commentUid, commentUsername);
    118120                }
    119121                if (parseMode == NoteParseMode.API) {
     
    177179
    178180    static LatLon parseLatLon(UnaryOperator<String> attrs) {
    179         double lat = Double.parseDouble(attrs.apply("lat"));
    180         double lon = Double.parseDouble(attrs.apply("lon"));
     181        final var lat = Double.parseDouble(attrs.apply("lat"));
     182        final var lon = Double.parseDouble(attrs.apply("lon"));
    181183        return new LatLon(lat, lon);
    182184    }
     
    195197
    196198    static Note parseNoteFull(UnaryOperator<String> attrs) {
    197         Note note = parseNoteBasic(attrs);
     199        final var note = parseNoteBasic(attrs);
    198200        String id = attrs.apply("id");
    199201        if (id != null) {
Note: See TracChangeset for help on using the changeset viewer.