Index: trunk/src/org/openstreetmap/josm/data/CustomConfigurator.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/CustomConfigurator.java	(revision 5589)
+++ trunk/src/org/openstreetmap/josm/data/CustomConfigurator.java	(revision 5590)
@@ -1028,7 +1028,11 @@
         engine.eval(finish);
 
+        @SuppressWarnings("unchecked")
         Map<String, String> stringMap =  (Map<String, String>) engine.get("stringMap");
+        @SuppressWarnings("unchecked")
         Map<String, List<String>> listMap = (SortedMap<String, List<String>> ) engine.get("listMap");
+        @SuppressWarnings("unchecked")
         Map<String, List<Collection<String>>> listlistMap = (SortedMap<String, List<Collection<String>>>) engine.get("listlistMap");
+        @SuppressWarnings("unchecked")
         Map<String, List<Map<String, String>>> listmapMap = (SortedMap<String, List<Map<String,String>>>) engine.get("listmapMap");
 
@@ -1050,5 +1054,6 @@
         for (Entry<String, List<Collection<String>>> e : listlistMap.entrySet()) {
             if (Preferences.equalArray(e.getValue(), tmpPref.arrayDefaults.get(e.getKey()))) continue;
-            tmpPref.arrayProperties.put(e.getKey(), (List<List<String>>)(List)e.getValue());
+            @SuppressWarnings("unchecked") List<List<String>> value = (List)e.getValue();
+            tmpPref.arrayProperties.put(e.getKey(), value);
         }
 
Index: trunk/src/org/openstreetmap/josm/data/Preferences.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/Preferences.java	(revision 5589)
+++ trunk/src/org/openstreetmap/josm/data/Preferences.java	(revision 5590)
@@ -1799,10 +1799,19 @@
         if (a instanceof StringSetting) 
             return (a.getValue().equals(b.getValue()));
-        if (a instanceof ListSetting) 
-            return equalCollection((Collection<String>) a.getValue(), (Collection<String>) b.getValue());
-        if (a instanceof ListListSetting) 
-            return equalArray((Collection<Collection<String>>) a.getValue(), (Collection<List<String>>) b.getValue());
-        if (a instanceof MapListSetting) 
-            return equalListOfStructs((Collection<Map<String, String>>) a.getValue(), (Collection<Map<String, String>>) b.getValue());
+        if (a instanceof ListSetting) {
+            @SuppressWarnings("unchecked") Collection<String> aValue = (Collection) a.getValue();
+            @SuppressWarnings("unchecked") Collection<String> bValue = (Collection) b.getValue();
+            return equalCollection(aValue, bValue);
+        }
+        if (a instanceof ListListSetting) {
+            @SuppressWarnings("unchecked") Collection<Collection<String>> aValue = (Collection) a.getValue();
+            @SuppressWarnings("unchecked") Collection<List<String>> bValue = (Collection) b.getValue();
+            return equalArray(aValue, bValue);
+        }
+        if (a instanceof MapListSetting) {
+            @SuppressWarnings("unchecked") Collection<Map<String, String>> aValue = (Collection) a.getValue();
+            @SuppressWarnings("unchecked") Collection<Map<String, String>> bValue = (Collection) b.getValue();
+            return equalListOfStructs(aValue, bValue);
+        }
         return a.equals(b);
     }
Index: trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java	(revision 5589)
+++ trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java	(revision 5590)
@@ -24,5 +24,4 @@
 import java.awt.geom.Rectangle2D;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
@@ -61,5 +60,4 @@
 import org.openstreetmap.josm.gui.mappaint.TextElement;
 import org.openstreetmap.josm.tools.ImageProvider;
-import org.openstreetmap.josm.tools.Pair;
 import org.openstreetmap.josm.tools.Utils;
 
@@ -1194,10 +1192,10 @@
 
                             while (dist < segmentLength) {
-                                for (Pair<Float, GeneralPath> sizeAndPath : Arrays.asList(new Pair[] {
-                                        new Pair<Float, GeneralPath>(3f, onewayArrowsCasing),
-                                        new Pair<Float, GeneralPath>(2f, onewayArrows)})) {
+                                for (int i=0; i<2; ++i) {
+                                    float onewaySize = i == 0 ? 3f : 2f;
+                                    GeneralPath onewayPath = i == 0 ? onewayArrowsCasing : onewayArrows;
 
                                     // scale such that border is 1 px
-                                    final double fac = - (onewayReversed ? -1 : 1) * sizeAndPath.a * (1 + sinPHI) / (sinPHI * cosPHI);
+                                    final double fac = - (onewayReversed ? -1 : 1) * onewaySize * (1 + sinPHI) / (sinPHI * cosPHI);
                                     final double sx = nx * fac;
                                     final double sy = ny * fac;
@@ -1205,11 +1203,11 @@
                                     // Attach the triangle at the incenter and not at the tip.
                                     // Makes the border even at all sides.
-                                    final double x = p1.x + nx * (dist + (onewayReversed ? -1 : 1) * (sizeAndPath.a / sinPHI));
-                                    final double y = p1.y + ny * (dist + (onewayReversed ? -1 : 1) * (sizeAndPath.a / sinPHI));
-
-                                    sizeAndPath.b.moveTo(x, y);
-                                    sizeAndPath.b.lineTo (x + cosPHI * sx - sinPHI * sy, y + sinPHI * sx + cosPHI * sy);
-                                    sizeAndPath.b.lineTo (x + cosPHI * sx + sinPHI * sy, y - sinPHI * sx + cosPHI * sy);
-                                    sizeAndPath.b.lineTo(x, y);
+                                    final double x = p1.x + nx * (dist + (onewayReversed ? -1 : 1) * (onewaySize / sinPHI));
+                                    final double y = p1.y + ny * (dist + (onewayReversed ? -1 : 1) * (onewaySize / sinPHI));
+
+                                    onewayPath.moveTo(x, y);
+                                    onewayPath.lineTo (x + cosPHI * sx - sinPHI * sy, y + sinPHI * sx + cosPHI * sy);
+                                    onewayPath.lineTo (x + cosPHI * sx + sinPHI * sy, y - sinPHI * sx + cosPHI * sy);
+                                    onewayPath.lineTo(x, y);
                                 }
                                 dist += interval;
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java	(revision 5589)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java	(revision 5590)
@@ -238,5 +238,4 @@
      * @param row The row of the table from which the value is edited.
      */
-    @SuppressWarnings("unchecked")
     private void editProperty(int row) {
         Collection<OsmPrimitive> sel = Main.main.getCurrentDataSet().getSelected();
@@ -269,4 +268,5 @@
         p.add(keys, GBC.eol().fill(GBC.HORIZONTAL));
 
+        @SuppressWarnings("unchecked")
         final Map<String, Integer> m = (Map<String, Integer>) propertyData.getValueAt(row, 1);
 
@@ -1376,8 +1376,7 @@
                     row = propertyTable.getSelectedRow();
                     String key = URLEncoder.encode(propertyData.getValueAt(row, 0).toString(), "UTF-8");
-                    String val = URLEncoder.encode(
-                            ((Map<String,Integer>)propertyData.getValueAt(row, 1))
-                            .entrySet().iterator().next().getKey(), "UTF-8"
-                            );
+                    @SuppressWarnings("unchecked")
+                    Map<String, Integer> m = (Map<String, Integer>) propertyData.getValueAt(row, 1);
+                    String val = URLEncoder.encode(m.entrySet().iterator().next().getKey(), "UTF-8");
 
                     uris.add(new URI(String.format("%s%sTag:%s=%s", base, lang, key, val)));
Index: trunk/src/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreference.java	(revision 5589)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreference.java	(revision 5590)
@@ -585,5 +585,7 @@
                 if (llEditor.getValue() == 1) {
                     List<List<String>> data = llEditor.getData();
-                    if (!Preferences.equalArray((Collection) llSetting.getValue(), data)) {
+                    @SuppressWarnings("unchecked")
+                    Collection<Collection<String>> llSettingValue = (Collection) llSetting.getValue();
+                    if (!Preferences.equalArray(llSettingValue, data)) {
                         pe.setValue(new ListListSetting(data));
                         ok = true;
@@ -645,5 +647,7 @@
             if (llEditor.getValue() == 1) {
                 List<List<String>> data = llEditor.getData();
-                if (!Preferences.equalArray((Collection) stg.getValue(), data)) {
+                @SuppressWarnings("unchecked")
+                Collection<Collection<String>> stgValue = (Collection) stg.getValue();
+                if (!Preferences.equalArray(stgValue, data)) {
                     e.setValue(new ListListSetting(data));
                     applyFilter();
Index: trunk/src/org/openstreetmap/josm/gui/preferences/advanced/MapListEditor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/advanced/MapListEditor.java	(revision 5589)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/advanced/MapListEditor.java	(revision 5590)
@@ -203,5 +203,7 @@
         private List<List<String>> data() {
             if (entryIdx == null) return Collections.emptyList();
-            return Arrays.asList(dataKeys.get(entryIdx), dataValues.get(entryIdx));
+            @SuppressWarnings("unchecked")
+            List<List<String>> result = Arrays.asList(dataKeys.get(entryIdx), dataValues.get(entryIdx));
+            return result;
         }
 
Index: trunk/src/org/openstreetmap/josm/io/GpxReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/GpxReader.java	(revision 5589)
+++ trunk/src/org/openstreetmap/josm/io/GpxReader.java	(revision 5590)
@@ -385,5 +385,7 @@
                 GpxLink link = new GpxLink(url);
                 link.text = urlname;
-                ((Collection<GpxLink>) attr.get(GpxData.META_LINKS)).add(link);
+                @SuppressWarnings("unchecked")
+                Collection<GpxLink> links = (Collection) attr.get(GpxData.META_LINKS);
+                links.add(link);
             }
         }
