Index: src/org/openstreetmap/josm/actions/FollowLineAction.java
===================================================================
--- src/org/openstreetmap/josm/actions/FollowLineAction.java	(revision 6111)
+++ src/org/openstreetmap/josm/actions/FollowLineAction.java	(working copy)
@@ -119,7 +119,7 @@
             // from aerial imagery or GPS tracks.
             if (Main.map.mapView.viewportFollowing) {
                 Main.map.mapView.smoothScrollTo(newPoint.getEastNorth());
-            };
+            }
         }
     }
 }
Index: src/org/openstreetmap/josm/command/SequenceCommand.java
===================================================================
--- src/org/openstreetmap/josm/command/SequenceCommand.java	(revision 6111)
+++ src/org/openstreetmap/josm/command/SequenceCommand.java	(working copy)
@@ -96,9 +96,8 @@
     }
 
     @Override
-    @SuppressWarnings("unchecked")
     public Collection<PseudoCommand> getChildren() {
-        return (List) Arrays.asList(sequence);
+        return Arrays.<PseudoCommand>asList(sequence);
     }
 
     @Override
Index: src/org/openstreetmap/josm/data/CustomConfigurator.java
===================================================================
--- src/org/openstreetmap/josm/data/CustomConfigurator.java	(revision 6111)
+++ src/org/openstreetmap/josm/data/CustomConfigurator.java	(working copy)
@@ -1084,10 +1084,10 @@
             listmapMap.putAll(tmpPref.listOfStructsDefaults);
         }
 
-        while (stringMap.values().remove(null)) { };
-        while (listMap.values().remove(null)) { };
-        while (listlistMap.values().remove(null)) { };
-        while (listmapMap.values().remove(null)) { };
+        while (stringMap.values().remove(null)) { }
+        while (listMap.values().remove(null)) { }
+        while (listlistMap.values().remove(null)) { }
+        while (listmapMap.values().remove(null)) { }
 
         stringMap.putAll(tmpPref.properties);
         listMap.putAll(tmpPref.collectionProperties);
Index: src/org/openstreetmap/josm/data/Preferences.java
===================================================================
--- src/org/openstreetmap/josm/data/Preferences.java	(revision 6111)
+++ src/org/openstreetmap/josm/data/Preferences.java	(working copy)
@@ -1287,7 +1287,7 @@
             public void visit(MapListSetting setting) {
                 changed = putListOfStructs(key, setting.getValue());
             }
-        };
+        }
         PutVisitor putVisitor = new PutVisitor();
         value.visit(putVisitor);
         return putVisitor.changed;
@@ -1668,7 +1668,7 @@
         }
     }
 
-    public static boolean isEqual(Setting a, Setting b) {
+    public static boolean isEqual(Setting<?> a, Setting<?> b) {
         if (a==null && b==null) return true;
         if (a==null) return false;
         if (b==null) return false;
@@ -1677,18 +1677,18 @@
         if (a instanceof StringSetting)
             return (a.getValue().equals(b.getValue()));
         if (a instanceof ListSetting) {
-            @SuppressWarnings("unchecked") Collection<String> aValue = (Collection) a.getValue();
-            @SuppressWarnings("unchecked") Collection<String> bValue = (Collection) b.getValue();
+            @SuppressWarnings("unchecked") Collection<String> aValue = (Collection<String>) a.getValue();
+            @SuppressWarnings("unchecked") Collection<String> bValue = (Collection<String>) 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();
+            @SuppressWarnings("unchecked") Collection<Collection<String>> aValue = (Collection<Collection<String>>) a.getValue();
+            @SuppressWarnings("unchecked") Collection<List<String>> bValue = (Collection<List<String>>) 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();
+            @SuppressWarnings("unchecked") Collection<Map<String, String>> aValue = (Collection<Map<String, String>>) a.getValue();
+            @SuppressWarnings("unchecked") Collection<Map<String, String>> bValue = (Collection<Map<String, String>>) b.getValue();
             return equalListOfStructs(aValue, bValue);
         }
         return a.equals(b);
Index: src/org/openstreetmap/josm/data/gpx/IWithAttributes.java
===================================================================
--- src/org/openstreetmap/josm/data/gpx/IWithAttributes.java	(revision 6111)
+++ src/org/openstreetmap/josm/data/gpx/IWithAttributes.java	(working copy)
@@ -36,7 +36,7 @@
      *         or {@code null} if this map contains no Collection mapping for the key
      * @since 5502
      */
-    Collection getCollection(String key);
+    Collection<?> getCollection(String key);
 
     /**
      * Put a key / value pair as a new attribute.
Index: src/org/openstreetmap/josm/data/gpx/WithAttributes.java
===================================================================
--- src/org/openstreetmap/josm/data/gpx/WithAttributes.java	(revision 6111)
+++ src/org/openstreetmap/josm/data/gpx/WithAttributes.java	(working copy)
@@ -56,9 +56,9 @@
      * @since 5502
      */
     @Override
-    public Collection getCollection(String key) {
+    public Collection<?> getCollection(String key) {
         Object value = attr.get(key);
-        return (value instanceof Collection) ? (Collection)value : null;
+        return (value instanceof Collection) ? (Collection<?>)value : null;
     }
 
     /**
Index: src/org/openstreetmap/josm/data/projection/CustomProjection.java
===================================================================
--- src/org/openstreetmap/josm/data/projection/CustomProjection.java	(revision 6111)
+++ src/org/openstreetmap/josm/data/projection/CustomProjection.java	(working copy)
@@ -326,7 +326,7 @@
     }
 
     public Proj parseProjection(Map<String, String> parameters, Ellipsoid ellps) throws ProjectionConfigurationException {
-        String id = (String) parameters.get(Param.proj.key);
+        String id = parameters.get(Param.proj.key);
         if (id == null) throw new ProjectionConfigurationException(tr("Projection required (+proj=*)"));
 
         Proj proj =  Projections.getBaseProjection(id);
Index: src/org/openstreetmap/josm/data/projection/proj/LambertConformalConic.java
===================================================================
--- src/org/openstreetmap/josm/data/projection/proj/LambertConformalConic.java	(revision 6111)
+++ src/org/openstreetmap/josm/data/projection/proj/LambertConformalConic.java	(working copy)
@@ -23,7 +23,7 @@
         public Parameters(double latitudeOrigin) {
             this.latitudeOrigin = latitudeOrigin;
         }
-    };
+    }
 
     public static class Parameters1SP extends Parameters {
         public Parameters1SP(double latitudeOrigin) {
Index: src/org/openstreetmap/josm/data/validation/tests/TagChecker.java
===================================================================
--- src/org/openstreetmap/josm/data/validation/tests/TagChecker.java	(revision 6111)
+++ src/org/openstreetmap/josm/data/validation/tests/TagChecker.java	(working copy)
@@ -821,7 +821,7 @@
                 }
                 return noMatch;
             }
-        };
+        }
 
         public String getData(String str) {
             Matcher m = Pattern.compile(" *# *([^#]+) *$").matcher(str);
Index: src/org/openstreetmap/josm/data/validation/tests/UntaggedWay.java
===================================================================
--- src/org/openstreetmap/josm/data/validation/tests/UntaggedWay.java	(revision 6111)
+++ src/org/openstreetmap/josm/data/validation/tests/UntaggedWay.java	(working copy)
@@ -49,7 +49,7 @@
         NAMED_WAYS.add( "secondary" );
         NAMED_WAYS.add( "tertiary" );
         NAMED_WAYS.add( "residential" );
-        NAMED_WAYS.add( "pedestrian" ); ;
+        NAMED_WAYS.add( "pedestrian" );
     }
 
     /** Whitelist of roles allowed to reference an untagged way */
Index: src/org/openstreetmap/josm/gui/NavigatableComponent.java
===================================================================
--- src/org/openstreetmap/josm/gui/NavigatableComponent.java	(revision 6111)
+++ src/org/openstreetmap/josm/gui/NavigatableComponent.java	(working copy)
@@ -493,7 +493,7 @@
                     {
                         // fixme - not use zoom history here
                         zoomTo(oldCenter.interpolate(finalNewCenter, (i+1) / frames));
-                        try { Thread.sleep(1000 / fps); } catch (InterruptedException ex) { };
+                        try { Thread.sleep(1000 / fps); } catch (InterruptedException ex) { }
                     }
                 }
             }.start();
Index: src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java
===================================================================
--- src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java	(revision 6111)
+++ src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java	(working copy)
@@ -850,7 +850,7 @@
         @Override public Class<?> getColumnClass(int columnIndex) {
             return String.class;
         }
-    };
+    }
 
     /**
      * Action handling delete button press in properties dialog.
Index: src/org/openstreetmap/josm/gui/io/UpdatePrimitivesTask.java
===================================================================
--- src/org/openstreetmap/josm/gui/io/UpdatePrimitivesTask.java	(revision 6111)
+++ src/org/openstreetmap/josm/gui/io/UpdatePrimitivesTask.java	(working copy)
@@ -90,7 +90,7 @@
         getProgressMonitor().indeterminateSubTask(tr("Initializing nodes to update ..."));
         for (OsmPrimitive primitive : toUpdate) {
             if (primitive instanceof Node && !primitive.isNew()) {
-                reader.append((Node)primitive);
+                reader.append(primitive);
             } else if (primitive instanceof Way) {
                 Way way = (Way)primitive;
                 for (Node node: way.getNodes()) {
@@ -106,7 +106,7 @@
         getProgressMonitor().indeterminateSubTask(tr("Initializing ways to update ..."));
         for (OsmPrimitive primitive : toUpdate) {
             if (primitive instanceof Way && !primitive.isNew()) {
-                reader.append((Way)primitive);
+                reader.append(primitive);
             }
         }
     }
@@ -115,7 +115,7 @@
         getProgressMonitor().indeterminateSubTask(tr("Initializing relations to update ..."));
         for (OsmPrimitive primitive : toUpdate) {
             if (primitive instanceof Relation && !primitive.isNew()) {
-                reader.append((Relation)primitive);
+                reader.append(primitive);
             }
         }
     }
Index: src/org/openstreetmap/josm/gui/layer/gpx/ChooseTrackVisibilityAction.java
===================================================================
--- src/org/openstreetmap/josm/gui/layer/gpx/ChooseTrackVisibilityAction.java	(revision 6111)
+++ src/org/openstreetmap/josm/gui/layer/gpx/ChooseTrackVisibilityAction.java	(working copy)
@@ -155,7 +155,7 @@
     }
 
     private void updateVisibilityFromTable() {
-        ListSelectionModel s = (ListSelectionModel) table.getSelectionModel();
+        ListSelectionModel s = table.getSelectionModel();
         for (int i = 0; i < layer.trackVisibility.length; i++) {
             layer.trackVisibility[table.convertRowIndexToModel(i)] = s.isSelectedIndex(i);
         }
Index: src/org/openstreetmap/josm/gui/mappaint/Cascade.java
===================================================================
--- src/org/openstreetmap/josm/gui/mappaint/Cascade.java	(revision 6111)
+++ src/org/openstreetmap/josm/gui/mappaint/Cascade.java	(working copy)
@@ -146,7 +146,7 @@
         if (o instanceof float[])
             return (float[]) o;
         if (o instanceof List) {
-            List l = (List) o;
+            List<?> l = (List<?>) o;
             float[] a = new float[l.size()];
             for (int i=0; i<l.size(); ++i) {
                 Float f = toFloat(l.get(i));
Index: src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java
===================================================================
--- src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java	(revision 6111)
+++ src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java	(working copy)
@@ -130,7 +130,7 @@
             return Arrays.asList(args);
         }
 
-        public static Object get(List objects, float index) {
+        public static Object get(List<? extends Object> objects, float index) {
             int idx = Math.round(index);
             if (idx >= 0 && idx < objects.size()) {
                 return objects.get(idx);
@@ -138,7 +138,7 @@
             return null;
         }
 
-        public static List split(String sep, String toSplit) {
+        public static List<String> split(String sep, String toSplit) {
             return Arrays.asList(toSplit.split(Pattern.quote(sep), -1));
         }
 
@@ -264,11 +264,10 @@
             return a < b;
         }
 
-        @SuppressWarnings(value = "unchecked")
         public static boolean equal(Object a, Object b) {
             // make sure the casts are done in a meaningful way, so
             // the 2 objects really can be considered equal
-            for (Class klass : new Class[]{Float.class, Boolean.class, Color.class, float[].class, String.class}) {
+            for (Class<?> klass : new Class[]{Float.class, Boolean.class, Color.class, float[].class, String.class}) {
                 Object a2 = Cascade.convertTo(a, klass);
                 Object b2 = Cascade.convertTo(b, klass);
                 if (a2 != null && b2 != null && a2.equals(b2)) {
@@ -316,7 +315,7 @@
             return Pattern.compile(pattern, f).matcher(target).matches();
         }
 
-        public static List regexp_match(String pattern, String target, String flags) {
+        public static List<String> regexp_match(String pattern, String target, String flags) {
             int f = 0;
             if (flags.contains("i")) {
                 f |= Pattern.CASE_INSENSITIVE;
@@ -339,7 +338,7 @@
             }
         }
 
-        public static List regexp_match(String pattern, String target) {
+        public static List<String> regexp_match(String pattern, String target) {
             Matcher m = Pattern.compile(pattern).matcher(target);
             if (m.matches()) {
                 List<String> result = new ArrayList<String>(m.groupCount() + 1);
@@ -479,7 +478,7 @@
 
         @Override
         public Object evaluate(Environment env) {
-            List l = Cascade.convertTo(arg.evaluate(env), List.class);
+            List<?> l = Cascade.convertTo(arg.evaluate(env), List.class);
             if (l != null)
                 return l.size();
             String s = Cascade.convertTo(arg.evaluate(env), String.class);
Index: src/org/openstreetmap/josm/gui/preferences/PluginPreference.java
===================================================================
--- src/org/openstreetmap/josm/gui/preferences/PluginPreference.java	(revision 6111)
+++ src/org/openstreetmap/josm/gui/preferences/PluginPreference.java	(working copy)
@@ -346,7 +346,7 @@
                                 JOptionPane.INFORMATION_MESSAGE,
                                 null // FIXME: provide help context
                                 );
-                    };
+                    }
                 });
             } catch (Exception e) {
                 e.printStackTrace();
Index: src/org/openstreetmap/josm/gui/preferences/advanced/PreferencesTable.java
===================================================================
--- src/org/openstreetmap/josm/gui/preferences/advanced/PreferencesTable.java	(revision 6111)
+++ src/org/openstreetmap/josm/gui/preferences/advanced/PreferencesTable.java	(working copy)
@@ -116,7 +116,7 @@
             if (llEditor.getValue() == 1) {
                 List<List<String>> data = llEditor.getData();
                 @SuppressWarnings("unchecked")
-                Collection<Collection<String>> stgValue = (Collection) stg.getValue();
+                Collection<Collection<String>> stgValue = (Collection<Collection<String>>) stg.getValue();
                 if (!Preferences.equalArray(stgValue, data)) {
                     e.setValue(new Preferences.ListListSetting(data));
                     return true;
Index: src/org/openstreetmap/josm/gui/preferences/plugin/PluginListPanel.java
===================================================================
--- src/org/openstreetmap/josm/gui/preferences/plugin/PluginListPanel.java	(revision 6111)
+++ src/org/openstreetmap/josm/gui/preferences/plugin/PluginListPanel.java	(working copy)
@@ -150,7 +150,7 @@
                 }
             }
         }
-    };
+    }
 
 
     /**
Index: src/org/openstreetmap/josm/gui/tagging/TaggingPresetItems.java
===================================================================
--- src/org/openstreetmap/josm/gui/tagging/TaggingPresetItems.java	(revision 6111)
+++ src/org/openstreetmap/josm/gui/tagging/TaggingPresetItems.java	(working copy)
@@ -555,7 +555,7 @@
                     bg.add(aibutton);
                     try {
                         // TODO there must be a better way to parse a number like "+3" than this.
-                        final int buttonvalue = ((Number)NumberFormat.getIntegerInstance().parse(ai.replace("+", ""))).intValue();
+                        final int buttonvalue = (NumberFormat.getIntegerInstance().parse(ai.replace("+", ""))).intValue();
                         if (auto_increment_selected == buttonvalue) aibutton.setSelected(true);
                         aibutton.addActionListener(new ActionListener() {
                             @Override
Index: src/org/openstreetmap/josm/io/GpxReader.java
===================================================================
--- src/org/openstreetmap/josm/io/GpxReader.java	(revision 6111)
+++ src/org/openstreetmap/josm/io/GpxReader.java	(working copy)
@@ -406,7 +406,7 @@
                 GpxLink link = new GpxLink(url);
                 link.text = urlname;
                 @SuppressWarnings("unchecked")
-                Collection<GpxLink> links = (Collection) attr.get(META_LINKS);
+                Collection<GpxLink> links = (Collection<GpxLink>) attr.get(META_LINKS);
                 links.add(link);
             }
         }
Index: src/org/openstreetmap/josm/io/GpxWriter.java
===================================================================
--- src/org/openstreetmap/josm/io/GpxWriter.java	(revision 6111)
+++ src/org/openstreetmap/josm/io/GpxWriter.java	(working copy)
@@ -81,7 +81,7 @@
         for (String key : WPT_KEYS) {
             if (key.equals(META_LINKS)) {
                 @SuppressWarnings("unchecked")
-                Collection<GpxLink> lValue = obj.getCollection(key);
+                Collection<GpxLink> lValue = (Collection<GpxLink>) obj.getCollection(key);
                 if (lValue != null) {
                     for (GpxLink link : lValue) {
                         gpxLink(link);
Index: src/org/openstreetmap/josm/io/remotecontrol/AddTagsDialog.java
===================================================================
--- src/org/openstreetmap/josm/io/remotecontrol/AddTagsDialog.java	(revision 6111)
+++ src/org/openstreetmap/josm/io/remotecontrol/AddTagsDialog.java	(working copy)
@@ -134,7 +134,7 @@
         final DefaultTableModel tm = new DefaultTableModel(new String[] {tr("Assume"), tr("Key"), tr("Value"), tr("Existing values")}, tags.length) {
             final Class<?>[] types = {Boolean.class, String.class, Object.class, ExistingValues.class};
             @Override
-            public Class getColumnClass(int c) {
+            public Class<?> getColumnClass(int c) {
                 return types[c];
             }
         };
Index: src/org/openstreetmap/josm/io/remotecontrol/RequestProcessor.java
===================================================================
--- src/org/openstreetmap/josm/io/remotecontrol/RequestProcessor.java	(revision 6111)
+++ src/org/openstreetmap/josm/io/remotecontrol/RequestProcessor.java	(working copy)
@@ -384,7 +384,7 @@
         PrintWriter r = new PrintWriter(w);
         RequestHandler handler = null;
         try {
-            Class c = handlers.get(cmd);
+            Class<?> c = handlers.get(cmd);
             if (c==null) return null;
             handler = handlers.get(cmd).newInstance();
         } catch (Exception ex) {
Index: src/org/openstreetmap/josm/io/session/SessionWriter.java
===================================================================
--- src/org/openstreetmap/josm/io/session/SessionWriter.java	(revision 6111)
+++ src/org/openstreetmap/josm/io/session/SessionWriter.java	(working copy)
@@ -72,8 +72,7 @@
         Class<? extends SessionLayerExporter> exporterClass = sessionLayerExporters.get(layerClass);
         if (exporterClass == null) return null;
         try {
-            @SuppressWarnings("unchecked")
-            Constructor<? extends SessionLayerExporter> constructor = (Constructor) exporterClass.getConstructor(layerClass);
+            Constructor<? extends SessionLayerExporter> constructor = exporterClass.getConstructor(layerClass);
             return constructor.newInstance(layer);
         } catch (Exception e) {
             throw new RuntimeException(e);
Index: src/org/openstreetmap/josm/tools/Diff.java
===================================================================
--- src/org/openstreetmap/josm/tools/Diff.java	(revision 6111)
+++ src/org/openstreetmap/josm/tools/Diff.java	(working copy)
@@ -815,7 +815,7 @@
             realindexes = new int[buffered_lines];
 
             for (int i = 0; i < data.length; ++i) {
-                Integer ir = (Integer)h.get(data[i]);
+                Integer ir = h.get(data[i]);
                 if (ir == null) {
                     h.put(data[i],new Integer(equivs[i] = equiv_max++));
                 } else {
Index: src/org/openstreetmap/josm/tools/ExifReader.java
===================================================================
--- src/org/openstreetmap/josm/tools/ExifReader.java	(revision 6111)
+++ src/org/openstreetmap/josm/tools/ExifReader.java	(working copy)
@@ -50,7 +50,7 @@
         return null;
     }
 
-    @SuppressWarnings("unchecked") public static Integer readOrientation(File filename) throws ParseException {
+    public static Integer readOrientation(File filename) throws ParseException {
         Integer orientation = null;
         try {
             final Metadata metadata = JpegMetadataReader.readMetadata(filename);
Index: src/org/openstreetmap/josm/tools/Geometry.java
===================================================================
--- src/org/openstreetmap/josm/tools/Geometry.java	(revision 6111)
+++ src/org/openstreetmap/josm/tools/Geometry.java	(working copy)
@@ -49,8 +49,8 @@
     public static Set<Node> addIntersections(List<Way> ways, boolean test, List<Command> cmds) {
 
         //stupid java, cannot instantiate array of generic classes..
+        int n = ways.size();
         @SuppressWarnings("unchecked")
-        int n = ways.size();
         ArrayList<Node>[] newNodes = new ArrayList[n];
         BBox[] wayBounds = new BBox[n];
         boolean[] changedWays = new boolean[n];
@@ -66,7 +66,7 @@
 
         //iterate over all way pairs and introduce the intersections
         Comparator<Node> coordsComparator = new NodePositionComparator();
-        WayLoop: for (int seg1Way = 0; seg1Way < n; seg1Way ++) {
+        for (int seg1Way = 0; seg1Way < n; seg1Way ++) {
             for (int seg2Way = seg1Way; seg2Way < n; seg2Way ++) {
 
                 //do not waste time on bounds that do not intersect
Index: src/org/openstreetmap/josm/tools/LanguageInfo.java
===================================================================
--- src/org/openstreetmap/josm/tools/LanguageInfo.java	(revision 6111)
+++ src/org/openstreetmap/josm/tools/LanguageInfo.java	(working copy)
@@ -17,7 +17,7 @@
         BASELANGUAGE,
         /** The standard english texts */
         ENGLISH
-    };
+    }
 
     /**
      * Replies the wiki language prefix for the given locale. The wiki language
Index: src/org/openstreetmap/josm/tools/TextTagParser.java
===================================================================
--- src/org/openstreetmap/josm/tools/TextTagParser.java	(revision 6111)
+++ src/org/openstreetmap/josm/tools/TextTagParser.java	(working copy)
@@ -109,7 +109,7 @@
         
         private void skipSign() {
             char c;
-            boolean signFound = false;;
+            boolean signFound = false;
             while (pos < n) {
                 c = data.charAt(pos);
                 if (c == '\t' || c == '\n'  || c == ' ') {
