Ticket #2957: unchecked.patch
| File unchecked.patch, 8.6 KB (added by , 17 years ago) |
|---|
-
src/org/openstreetmap/josm/actions/CombineWayAction.java
55 55 DataSet.selListeners.add(this); 56 56 } 57 57 58 @SuppressWarnings("unchecked") 58 59 public void actionPerformed(ActionEvent event) { 59 60 Collection<OsmPrimitive> selection = Main.ds.getSelected(); 60 61 LinkedList<Way> selectedWays = new LinkedList<Way>(); -
src/org/openstreetmap/josm/gui/conflict/nodes/NodeListTableCellRenderer.java
188 188 * @param table the table 189 189 * @return the table model 190 190 */ 191 @SuppressWarnings("unchecked") 191 192 protected ListMergeModel<Node>.EntriesTableModel getModel(JTable table) { 192 193 return (ListMergeModel.EntriesTableModel)table.getModel(); 193 194 } -
src/org/openstreetmap/josm/gui/conflict/relation/RelationMemberTableCellRenderer.java
225 225 * @param table the table 226 226 * @return the table model 227 227 */ 228 @SuppressWarnings("unchecked") 228 229 protected ListMergeModel<Node>.EntriesTableModel getModel(JTable table) { 229 230 return (ListMergeModel.EntriesTableModel)table.getModel(); 230 231 } -
src/org/openstreetmap/josm/gui/layer/markerlayer/Marker.java
97 97 // Add one Maker specifying the default behaviour. 98 98 static { 99 99 Marker.markerProducers.add(new MarkerProducers() { 100 @SuppressWarnings("unchecked") 100 101 public Marker createMarker(WayPoint wpt, File relativePath, MarkerLayer parentLayer, double time, double offset) { 101 102 String uri = null; 102 103 // cheapest way to check whether "link" object exists and is a non-empty -
src/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayer.java
67 67 private static double audioAnimationInterval = 0.0; // seconds 68 68 private static double playheadTime = -1.0; 69 69 */ 70 @SuppressWarnings("unchecked") 70 71 public MarkerLayer(GpxData indata, String name, File associatedFile, GpxLayer fromLayer) { 71 72 72 73 super(name); -
src/org/openstreetmap/josm/gui/dialogs/PropertiesDialog.java
133 133 * Edit the value in the properties table row 134 134 * @param row The row of the table from which the value is edited. 135 135 */ 136 @SuppressWarnings("unchecked") 136 137 void propertyEdit(int row) { 137 138 Collection<OsmPrimitive> sel = Main.ds.getSelected(); 138 139 if (sel.isEmpty()) return; … … 303 304 * 304 305 * @param row 305 306 */ 307 @SuppressWarnings("unchecked") 306 308 void membershipEdit(int row) { 307 309 Relation relation = (Relation)membershipData.getValueAt(row, 0); 308 310 Main.main.map.relationListDialog.selectRelation(relation); … … 477 479 propertyTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); 478 480 479 481 propertyTable.getColumnModel().getColumn(1).setCellRenderer(new DefaultTableCellRenderer(){ 482 @SuppressWarnings("unchecked") 480 483 @Override public Component getTableCellRendererComponent(JTable table, Object value, 481 484 boolean isSelected, boolean hasFocus, int row, int column) { 482 485 Component c = super.getTableCellRendererComponent(table, value, isSelected, false, row, column); … … 520 523 }); 521 524 522 525 membershipTable.getColumnModel().getColumn(1).setCellRenderer(new DefaultTableCellRenderer() { 526 @SuppressWarnings("unchecked") 523 527 @Override public Component getTableCellRendererComponent(JTable table, Object value, 524 528 boolean isSelected, boolean hasFocus, int row, int column) { 525 529 Component c = super.getTableCellRendererComponent(table, value, isSelected, false, row, column); -
src/org/openstreetmap/josm/gui/FileDrop.java
323 323 // over the drag target. 324 324 } // end dragOver 325 325 326 @SuppressWarnings("unchecked") 326 327 public void drop( java.awt.dnd.DropTargetDropEvent evt ) 327 328 { log( out, "FileDrop: drop event." ); 328 329 try … … 467 468 private static File[] createFileArray(BufferedReader bReader, PrintStream out) 468 469 { 469 470 try { 470 java.util.List list = new java.util.ArrayList();471 java.util.List<File> list = new java.util.ArrayList<File>(); 471 472 java.lang.String line = null; 472 473 while ((line = bReader.readLine()) != null) { 473 474 try { -
src/org/openstreetmap/josm/io/GpxReader.java
190 190 } 191 191 } 192 192 193 @SuppressWarnings("unchecked") 193 194 @Override public void endElement(String namespaceURI, String qName, String rqName) { 194 195 switch (currentState) { 195 196 case metadata: -
src/org/openstreetmap/josm/io/GpxWriter.java
57 57 out.flush(); 58 58 } 59 59 60 @SuppressWarnings("unchecked") 60 61 private void writeAttr(Map<String, Object> attr) { 61 62 // FIXME this loop is evil, because it does not assure the 62 63 // correct element order specified by the xml schema. … … 73 74 } 74 75 } 75 76 77 @SuppressWarnings("unchecked") 76 78 private void writeMetaData() { 77 79 Map<String, Object> attr = data.attr; 78 80 openln("metadata"); -
src/org/openstreetmap/josm/data/conflict/Conflict.java
51 51 } 52 52 53 53 @Override 54 @SuppressWarnings("unchecked") 54 55 public boolean equals(Object obj) { 55 56 if (this == obj) 56 57 return true; -
src/org/openstreetmap/josm/data/gpx/GpxData.java
39 39 public Collection<GpxRoute> routes = new LinkedList<GpxRoute>(); 40 40 public Collection<WayPoint> waypoints = new LinkedList<WayPoint>(); 41 41 42 @SuppressWarnings("unchecked") 42 43 public void mergeFrom(GpxData other) { 43 44 if (storageFile == null && other.storageFile != null) { 44 45 storageFile = other.storageFile; -
build.xml
66 66 <javac srcdir="src" classpathref="classpath" destdir="build" 67 67 target="1.5" source="1.5" debug="on" encoding="UTF-8"> 68 68 <compilerarg value="-Xlint:deprecation"/> 69 <compilerarg value="-Xlint:unchecked"/> 69 70 </javac> 70 71 </target> 71 72
