Changeset 18332 in josm for trunk/src


Ignore:
Timestamp:
2021-12-20T14:12:10+01:00 (4 years ago)
Author:
Don-vip
Message:

see #21596 - Update dependencies in ivy.xml and tools/ivy.xml (patch by taylor.smock)

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

Legend:

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

    r18314 r18332  
    248248
    249249        protected void alertFilesWithUnknownImporter(Collection<File> files) {
    250             final StringBuilder msg = new StringBuilder(128).append("<html>").append(
     250            final StringBuilder msg = new StringBuilder(115 + 30 * files.size()).append("<html>").append(
    251251                    trn("Cannot open {0} file because file does not exist or no suitable file importer is available.",
    252252                        "Cannot open {0} files because files do not exist or no suitable file importer is available.",
  • trunk/src/org/openstreetmap/josm/actions/mapmode/ExtrudeAction.java

    r17896 r18332  
    264264            }
    265265        } else {
    266             if (mode == Mode.translate)
     266            if (mode == Mode.translate) {
    267267                rv = new StringBuilder(tr("Move a segment along its normal, then release the mouse button."));
    268             else if (mode == Mode.translate_node)
     268            } else if (mode == Mode.translate_node) {
    269269                rv = new StringBuilder(tr("Move the node along one of the segments, then release the mouse button."));
    270             else if (mode == Mode.extrude || mode == Mode.create_new)
     270            } else if (mode == Mode.extrude || mode == Mode.create_new) {
    271271                rv = new StringBuilder(tr("Draw a rectangle of the desired size, then release the mouse button."));
    272             else {
     272            } else {
    273273                Logging.warn("Extrude: unknown mode " + mode);
    274274                rv = new StringBuilder();
  • trunk/src/org/openstreetmap/josm/data/osm/DefaultNameFormatter.java

    r18208 r18332  
    566566        }
    567567        if (sb.length() == 0) {
    568             sb.append(
    569                     way.hasKey("highway") ? tr("highway") :
    570                     way.hasKey("railway") ? tr("railway") :
    571                     way.hasKey("waterway") ? tr("waterway") :
    572                     way.hasKey("landuse") ? tr("landuse") : ""
    573                     );
     568            if (way.hasKey("highway")) {
     569                sb.append(tr("highway"));
     570            } else if (way.hasKey("railway")) {
     571                sb.append("railway");
     572            } else if (way.hasKey("waterway")) {
     573                sb.append(tr("waterway"));
     574            } else if (way.hasKey("landuse")) {
     575                sb.append(tr("landuse"));
     576            }
    574577        }
    575578
     
    581584        /* note: length == 0 should no longer happen, but leave the bracket code
    582585           nevertheless, who knows what future brings */
    583         sb.append((sb.length() > 0) ? (" ("+nodes+')') : nodes);
     586        if (sb.length() > 0) {
     587            sb.append(" (").append(nodes).append(')');
     588        } else {
     589            sb.append(nodes);
     590        }
    584591        decorateNameWithId(sb, way);
    585592        return sb.toString();
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/AbstractMapRenderer.java

    r18170 r18332  
    183183
    184184    /**
    185      * Reads all the settings from preferences. Calls the @{link #getColors}
     185     * Reads all the settings from preferences. Calls the {@link #getColors}
    186186     * function.
    187187     *
  • trunk/src/org/openstreetmap/josm/data/validation/routines/DomainValidator.java

    r18295 r18332  
    19911991            char lastChar = input.charAt(length-1); // fetch original last char
    19921992            switch(lastChar) {
    1993                 case '\u002E': // "." full stop
     1993                case '.':      // "." full stop, AKA U+002E
    19941994                case '\u3002': // ideographic full stop
    19951995                case '\uFF0E': // fullwidth full stop
  • trunk/src/org/openstreetmap/josm/data/validation/tests/Addresses.java

    r17787 r18332  
    364364        LatLon centerA = a.getBBox().getCenter();
    365365        LatLon centerB = b.getBBox().getCenter();
    366         return (centerA.greatCircleDistance(centerB));
     366        return centerA.greatCircleDistance(centerB);
    367367    }
    368368
  • trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java

    r18293 r18332  
    575575
    576576    /**
    577      * Update selection status, call @{link #selectionChanged} function.
     577     * Update selection status, call {@link #selectionChanged} function.
    578578     */
    579579    private void updateSelection() {
  • trunk/src/org/openstreetmap/josm/io/ozi/OziWptReader.java

    r18179 r18332  
    7474                    } else {
    7575                        try {
    76                             String[] fields = line.split(",");
     76                            String[] fields = line.split(",", -1);
    7777                            WayPoint currentwp = new WayPoint(new LatLon(
    7878                                    Double.parseDouble(fields[IDX_LAT]),
  • trunk/src/org/openstreetmap/josm/tools/HttpClient.java

    r18211 r18332  
    379379         * @see HttpURLConnection#getErrorStream()
    380380         */
    381         @SuppressWarnings("resource")
     381        @SuppressWarnings({"resource",
     382                /* All 4 `InputStream in` reassignments would close the original when the returned stream is closed */
     383                "PMD.CloseResource"})
    382384        public final InputStream getContent() throws IOException {
    383             InputStream in = getInputStream();
    384             in = new ProgressInputStream(in, getContentLength(), monitor);
    385             in = "gzip".equalsIgnoreCase(getContentEncoding())
    386                     ? new GZIPInputStream(in)
    387                     : "deflate".equalsIgnoreCase(getContentEncoding())
    388                     ? new InflaterInputStream(in)
    389                     : in;
     385            InputStream in = new ProgressInputStream(getInputStream(), getContentLength(), monitor);
     386            if ("gzip".equalsIgnoreCase(getContentEncoding())) {
     387                in = new GZIPInputStream(in);
     388            } else if ("deflate".equalsIgnoreCase(getContentEncoding())) {
     389                in = new InflaterInputStream(in);
     390            }
    390391            Compression compression = Compression.NONE;
    391392            if (uncompress) {
Note: See TracChangeset for help on using the changeset viewer.