Changeset 16955 in josm for trunk/src/org


Ignore:
Timestamp:
2020-08-29T07:53:14+02:00 (4 years ago)
Author:
simon04
Message:

see #19624 - use Utils.strip

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

Legend:

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

    r16954 r16955  
    4343import org.openstreetmap.josm.gui.progress.ProgressMonitor;
    4444import org.openstreetmap.josm.tools.Logging;
     45import org.openstreetmap.josm.tools.Utils;
    4546
    4647/**
     
    391392            try {
    392393                while ((line = reader.readLine()) != null) {
    393                     line = line.replaceFirst(rs, "");
     394                    line = Utils.strip(line, rs);
    394395                    try (InputStream is = new ByteArrayInputStream(line.getBytes(StandardCharsets.UTF_8))) {
    395396                        parse(is);
  • trunk/src/org/openstreetmap/josm/tools/Utils.java

    r16643 r16955  
    744744     */
    745745    public static String strip(final String str) {
    746         if (str == null || str.isEmpty()) {
    747             return str;
    748         }
    749746        return strip(str, DEFAULT_STRIP);
    750747    }
Note: See TracChangeset for help on using the changeset viewer.