Index: trunk/src/org/openstreetmap/josm/actions/SimplifyWayAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/SimplifyWayAction.java	(revision 15426)
+++ trunk/src/org/openstreetmap/josm/actions/SimplifyWayAction.java	(revision 15427)
@@ -184,8 +184,5 @@
 
             String lengthstr = SystemOfMeasurement.getSystemOfMeasurement().getDistText(
-                    ways.stream().collect(
-                            Collectors.summingDouble(w -> {
-                                return w.getLength();
-                            })));
+                    ways.stream().mapToDouble(Way::getLength).sum());
 
             double err = askSimplifyWays(trn(
Index: trunk/src/org/openstreetmap/josm/data/SystemOfMeasurement.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/SystemOfMeasurement.java	(revision 15426)
+++ trunk/src/org/openstreetmap/josm/data/SystemOfMeasurement.java	(revision 15427)
@@ -5,4 +5,5 @@
 
 import java.text.NumberFormat;
+import java.util.Collections;
 import java.util.Locale;
 import java.util.Map;
@@ -73,6 +74,7 @@
      * @since 3406
      */
-    public static final Map<String, SystemOfMeasurement> ALL_SYSTEMS = Stream.of(METRIC, CHINESE, IMPERIAL, NAUTICAL_MILE)
-            .collect(Collectors.toMap(SystemOfMeasurement::getName, Function.identity()));
+    public static final Map<String, SystemOfMeasurement> ALL_SYSTEMS = Collections.unmodifiableMap(
+            Stream.of(METRIC, CHINESE, IMPERIAL, NAUTICAL_MILE)
+            .collect(Collectors.toMap(SystemOfMeasurement::getName, Function.identity())));
 
     /**
Index: trunk/src/org/openstreetmap/josm/data/gpx/GpxData.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/gpx/GpxData.java	(revision 15426)
+++ trunk/src/org/openstreetmap/josm/data/gpx/GpxData.java	(revision 15427)
@@ -436,4 +436,5 @@
 
     /**
+     * Ensures a unique name among gpx layers
      * @param attrs attributes of/for an gpx track, written to if the name appeared previously in {@code counts}.
      * @param counts a {@code HashMap} of previously seen names, associated with their count.
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/SharpAngles.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/SharpAngles.java	(revision 15426)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/SharpAngles.java	(revision 15427)
@@ -9,4 +9,5 @@
 import java.util.Map;
 import java.util.Map.Entry;
+import java.util.Objects;
 import java.util.TreeSet;
 
@@ -20,5 +21,5 @@
 import org.openstreetmap.josm.data.validation.TestError;
 import org.openstreetmap.josm.tools.Geometry;
-import org.openstreetmap.josm.tools.Logging;
+import org.openstreetmap.josm.tools.bugreport.BugReport;
 
 /**
@@ -56,7 +57,6 @@
             try {
                 checkWayForSharpAngles(way);
-            } catch (Exception e) {
-                Logging.error("Way https://osm.org/way/{0} caused an error ({1})", way.getUniqueId(), e);
-                throw e;
+            } catch (RuntimeException e) {
+                throw BugReport.intercept(e).put("way", way);
             }
         }
@@ -159,4 +159,20 @@
         severityBreakPoints.put(maxAngle * 2 / 3, Severity.WARNING);
     }
+
+    @Override
+    public int hashCode() {
+        return 31 * super.hashCode() + Objects.hash(ignoreHighways, maxAngle, maxLength);
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj)
+            return true;
+        if (!super.equals(obj) || getClass() != obj.getClass())
+            return false;
+        SharpAngles other = (SharpAngles) obj;
+        return Objects.equals(ignoreHighways, other.ignoreHighways)
+                && Double.doubleToLongBits(maxAngle) == Double.doubleToLongBits(other.maxAngle)
+                && Double.doubleToLongBits(maxLength) == Double.doubleToLongBits(other.maxLength);
+    }
 }
-
Index: trunk/src/org/openstreetmap/josm/gui/io/importexport/GeoJSONImporter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/importexport/GeoJSONImporter.java	(revision 15426)
+++ trunk/src/org/openstreetmap/josm/gui/io/importexport/GeoJSONImporter.java	(revision 15427)
@@ -52,5 +52,5 @@
             progressMonitor.worked(1);
             MainApplication.getLayerManager().addLayer(new OsmDataLayer(data, file.getName(), file));
-        } catch (final Exception e) {
+        } catch (IOException | IllegalDataException e) {
             Logging.error("Error while reading json file!");
             Logging.error(e);
Index: trunk/src/org/openstreetmap/josm/io/GeoJSONReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/GeoJSONReader.java	(revision 15426)
+++ trunk/src/org/openstreetmap/josm/io/GeoJSONReader.java	(revision 15427)
@@ -89,9 +89,9 @@
     private void parseFeature(final JsonObject feature) {
         JsonValue geometry = feature.get(GEOMETRY);
-        if (geometry != null && geometry.getValueType().equals(JsonValue.ValueType.OBJECT)) {
+        if (geometry != null && geometry.getValueType() == JsonValue.ValueType.OBJECT) {
             parseGeometry(feature, geometry.asJsonObject());
         } else {
             JsonValue properties = feature.get(PROPERTIES);
-            if (properties != null && properties.getValueType().equals(JsonValue.ValueType.OBJECT)) {
+            if (properties != null && properties.getValueType() == JsonValue.ValueType.OBJECT) {
                 parseNonGeometryFeature(feature, properties.asJsonObject());
             } else {
@@ -104,5 +104,5 @@
         // get relation type
         JsonValue type = properties.get(TYPE);
-        if (type == null || properties.getValueType().equals(JsonValue.ValueType.STRING)) {
+        if (type == null || properties.getValueType() == JsonValue.ValueType.STRING) {
             Logging.warn(tr("Relation/non-geometry feature without type found: {0}", feature));
             return;
@@ -258,5 +258,5 @@
     }
 
-    private void fillTagsFromFeature(final JsonObject feature, final OsmPrimitive primitive) {
+    private static void fillTagsFromFeature(final JsonObject feature, final OsmPrimitive primitive) {
         if (feature != null) {
             primitive.setKeys(getTags(feature));
@@ -264,18 +264,18 @@
     }
 
-    private void parseUnknown(final JsonObject object) {
+    private static void parseUnknown(final JsonObject object) {
         Logging.warn(tr("Unknown json object found {0}", object));
     }
 
-    private void parseNullGeometry(JsonObject feature) {
+    private static void parseNullGeometry(JsonObject feature) {
         Logging.warn(tr("Geometry of feature {0} is null", feature));
     }
 
-    private Map<String, String> getTags(final JsonObject feature) {
+    private static Map<String, String> getTags(final JsonObject feature) {
         final Map<String, String> tags = new TreeMap<>();
 
         if (feature.containsKey(PROPERTIES) && !feature.isNull(PROPERTIES)) {
             JsonValue properties = feature.get(PROPERTIES);
-            if (properties != null && JsonValue.ValueType.OBJECT.equals(properties.getValueType())) {
+            if (properties != null && properties.getValueType() == JsonValue.ValueType.OBJECT) {
                 for (Map.Entry<String, JsonValue> stringJsonValueEntry : properties.asJsonObject().entrySet()) {
                     final JsonValue value = stringJsonValueEntry.getValue();
Index: trunk/src/org/openstreetmap/josm/io/GeoJSONServerReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/GeoJSONServerReader.java	(revision 15426)
+++ trunk/src/org/openstreetmap/josm/io/GeoJSONServerReader.java	(revision 15427)
@@ -4,4 +4,5 @@
 import static org.openstreetmap.josm.tools.I18n.tr;
 
+import java.io.IOException;
 import java.util.Objects;
 
@@ -32,5 +33,5 @@
             progressMonitor.beginTask(tr("Contacting Server…"), 10);
             return new GeoJSONImporter().parseDataSet(url);
-        } catch (Exception e) {
+        } catch (IOException | IllegalDataException e) {
             throw new OsmTransferException(e);
         } finally {
Index: trunk/src/org/openstreetmap/josm/tools/XmlObjectParser.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/XmlObjectParser.java	(revision 15426)
+++ trunk/src/org/openstreetmap/josm/tools/XmlObjectParser.java	(revision 15427)
@@ -140,5 +140,5 @@
                 fieldName += '_';
             }
-            fieldName = fieldName.replaceAll(":", "_");
+            fieldName = fieldName.replace(':', '_');
             try {
                 Object c = current.peek();
Index: trunk/test/unit/org/openstreetmap/josm/io/GeoJSONReaderTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/io/GeoJSONReaderTest.java	(revision 15426)
+++ trunk/test/unit/org/openstreetmap/josm/io/GeoJSONReaderTest.java	(revision 15427)
@@ -39,5 +39,5 @@
      */
     @Test
-    public void test() throws Exception {
+    public void testReadGeoJson() throws Exception {
         try (InputStream in = Files.newInputStream(Paths.get(TestUtils.getTestDataRoot(), "geo.json"))) {
             final List<OsmPrimitive> primitives = new ArrayList<>(new GeoJSONReader()
