- Timestamp:
- 2013-08-11T21:23:19+02:00 (12 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 29 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/FollowLineAction.java
r6104 r6142 120 120 if (Main.map.mapView.viewportFollowing) { 121 121 Main.map.mapView.smoothScrollTo(newPoint.getEastNorth()); 122 } ;122 } 123 123 } 124 124 } -
trunk/src/org/openstreetmap/josm/command/SequenceCommand.java
r5926 r6142 97 97 98 98 @Override 99 @SuppressWarnings("unchecked")100 99 public Collection<PseudoCommand> getChildren() { 101 return (List)Arrays.asList(sequence);100 return Arrays.<PseudoCommand>asList(sequence); 102 101 } 103 102 -
trunk/src/org/openstreetmap/josm/data/CustomConfigurator.java
r6084 r6142 1085 1085 } 1086 1086 1087 while (stringMap.values().remove(null)) { } ;1088 while (listMap.values().remove(null)) { } ;1089 while (listlistMap.values().remove(null)) { } ;1090 while (listmapMap.values().remove(null)) { } ;1087 while (stringMap.values().remove(null)) { } 1088 while (listMap.values().remove(null)) { } 1089 while (listlistMap.values().remove(null)) { } 1090 while (listmapMap.values().remove(null)) { } 1091 1091 1092 1092 stringMap.putAll(tmpPref.properties); -
trunk/src/org/openstreetmap/josm/data/Preferences.java
r6087 r6142 1288 1288 changed = putListOfStructs(key, setting.getValue()); 1289 1289 } 1290 } ;1290 } 1291 1291 PutVisitor putVisitor = new PutVisitor(); 1292 1292 value.visit(putVisitor); … … 1669 1669 } 1670 1670 1671 public static boolean isEqual(Setting a, Setting b) { 1671 public static boolean isEqual(Setting<?> a, Setting<?> b) { 1672 1672 if (a==null && b==null) return true; 1673 1673 if (a==null) return false; … … 1678 1678 return (a.getValue().equals(b.getValue())); 1679 1679 if (a instanceof ListSetting) { 1680 @SuppressWarnings("unchecked") Collection<String> aValue = (Collection) a.getValue(); 1681 @SuppressWarnings("unchecked") Collection<String> bValue = (Collection) b.getValue(); 1680 @SuppressWarnings("unchecked") Collection<String> aValue = (Collection<String>) a.getValue(); 1681 @SuppressWarnings("unchecked") Collection<String> bValue = (Collection<String>) b.getValue(); 1682 1682 return equalCollection(aValue, bValue); 1683 1683 } 1684 1684 if (a instanceof ListListSetting) { 1685 @SuppressWarnings("unchecked") Collection<Collection<String>> aValue = (Collection) a.getValue(); 1686 @SuppressWarnings("unchecked") Collection<List<String>> bValue = (Collection) b.getValue(); 1685 @SuppressWarnings("unchecked") Collection<Collection<String>> aValue = (Collection<Collection<String>>) a.getValue(); 1686 @SuppressWarnings("unchecked") Collection<List<String>> bValue = (Collection<List<String>>) b.getValue(); 1687 1687 return equalArray(aValue, bValue); 1688 1688 } 1689 1689 if (a instanceof MapListSetting) { 1690 @SuppressWarnings("unchecked") Collection<Map<String, String>> aValue = (Collection) a.getValue(); 1691 @SuppressWarnings("unchecked") Collection<Map<String, String>> bValue = (Collection) b.getValue(); 1690 @SuppressWarnings("unchecked") Collection<Map<String, String>> aValue = (Collection<Map<String, String>>) a.getValue(); 1691 @SuppressWarnings("unchecked") Collection<Map<String, String>> bValue = (Collection<Map<String, String>>) b.getValue(); 1692 1692 return equalListOfStructs(aValue, bValue); 1693 1693 } -
trunk/src/org/openstreetmap/josm/data/gpx/IWithAttributes.java
r6069 r6142 37 37 * @since 5502 38 38 */ 39 Collection getCollection(String key); 39 Collection<?> getCollection(String key); 40 40 41 41 /** -
trunk/src/org/openstreetmap/josm/data/gpx/WithAttributes.java
r5684 r6142 57 57 */ 58 58 @Override 59 public Collection getCollection(String key) { 59 public Collection<?> getCollection(String key) { 60 60 Object value = attr.get(key); 61 return (value instanceof Collection) ? (Collection)value : null; 61 return (value instanceof Collection) ? (Collection<?>)value : null; 62 62 } 63 63 -
trunk/src/org/openstreetmap/josm/data/projection/CustomProjection.java
r6104 r6142 327 327 328 328 public Proj parseProjection(Map<String, String> parameters, Ellipsoid ellps) throws ProjectionConfigurationException { 329 String id = (String)parameters.get(Param.proj.key);329 String id = parameters.get(Param.proj.key); 330 330 if (id == null) throw new ProjectionConfigurationException(tr("Projection required (+proj=*)")); 331 331 -
trunk/src/org/openstreetmap/josm/data/projection/proj/LambertConformalConic.java
r5230 r6142 24 24 this.latitudeOrigin = latitudeOrigin; 25 25 } 26 } ;26 } 27 27 28 28 public static class Parameters1SP extends Parameters { -
trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java
r6083 r6142 822 822 return noMatch; 823 823 } 824 } ;824 } 825 825 826 826 public String getData(String str) { -
trunk/src/org/openstreetmap/josm/data/validation/tests/UntaggedWay.java
r6069 r6142 50 50 NAMED_WAYS.add( "tertiary" ); 51 51 NAMED_WAYS.add( "residential" ); 52 NAMED_WAYS.add( "pedestrian" ); ;52 NAMED_WAYS.add( "pedestrian" ); 53 53 } 54 54 -
trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java
r6096 r6142 494 494 // fixme - not use zoom history here 495 495 zoomTo(oldCenter.interpolate(finalNewCenter, (i+1) / frames)); 496 try { Thread.sleep(1000 / fps); } catch (InterruptedException ex) { } ;496 try { Thread.sleep(1000 / fps); } catch (InterruptedException ex) { } 497 497 } 498 498 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java
r6109 r6142 851 851 return String.class; 852 852 } 853 } ;853 } 854 854 855 855 /** -
trunk/src/org/openstreetmap/josm/gui/io/UpdatePrimitivesTask.java
r6084 r6142 91 91 for (OsmPrimitive primitive : toUpdate) { 92 92 if (primitive instanceof Node && !primitive.isNew()) { 93 reader.append( (Node)primitive);93 reader.append(primitive); 94 94 } else if (primitive instanceof Way) { 95 95 Way way = (Way)primitive; … … 107 107 for (OsmPrimitive primitive : toUpdate) { 108 108 if (primitive instanceof Way && !primitive.isNew()) { 109 reader.append( (Way)primitive);109 reader.append(primitive); 110 110 } 111 111 } … … 116 116 for (OsmPrimitive primitive : toUpdate) { 117 117 if (primitive instanceof Relation && !primitive.isNew()) { 118 reader.append( (Relation)primitive);118 reader.append(primitive); 119 119 } 120 120 } -
trunk/src/org/openstreetmap/josm/gui/layer/gpx/ChooseTrackVisibilityAction.java
r6101 r6142 156 156 157 157 private void updateVisibilityFromTable() { 158 ListSelectionModel s = (ListSelectionModel)table.getSelectionModel();158 ListSelectionModel s = table.getSelectionModel(); 159 159 for (int i = 0; i < layer.trackVisibility.length; i++) { 160 160 layer.trackVisibility[table.convertRowIndexToModel(i)] = s.isSelectedIndex(i); -
trunk/src/org/openstreetmap/josm/gui/mappaint/Cascade.java
r6070 r6142 147 147 return (float[]) o; 148 148 if (o instanceof List) { 149 List l = (List) o; 149 List<?> l = (List<?>) o; 150 150 float[] a = new float[l.size()]; 151 151 for (int i=0; i<l.size(); ++i) { -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java
r5714 r6142 131 131 } 132 132 133 public static Object get(List objects, float index) { 133 public static Object get(List<? extends Object> objects, float index) { 134 134 int idx = Math.round(index); 135 135 if (idx >= 0 && idx < objects.size()) { … … 139 139 } 140 140 141 public static List split(String sep, String toSplit) { 141 public static List<String> split(String sep, String toSplit) { 142 142 return Arrays.asList(toSplit.split(Pattern.quote(sep), -1)); 143 143 } … … 265 265 } 266 266 267 @SuppressWarnings(value = "unchecked")268 267 public static boolean equal(Object a, Object b) { 269 268 // make sure the casts are done in a meaningful way, so 270 269 // the 2 objects really can be considered equal 271 for (Class klass : new Class[]{Float.class, Boolean.class, Color.class, float[].class, String.class}) { 270 for (Class<?> klass : new Class[]{Float.class, Boolean.class, Color.class, float[].class, String.class}) { 272 271 Object a2 = Cascade.convertTo(a, klass); 273 272 Object b2 = Cascade.convertTo(b, klass); … … 317 316 } 318 317 319 public static List regexp_match(String pattern, String target, String flags) { 318 public static List<String> regexp_match(String pattern, String target, String flags) { 320 319 int f = 0; 321 320 if (flags.contains("i")) { … … 340 339 } 341 340 342 public static List regexp_match(String pattern, String target) { 341 public static List<String> regexp_match(String pattern, String target) { 343 342 Matcher m = Pattern.compile(pattern).matcher(target); 344 343 if (m.matches()) { … … 480 479 @Override 481 480 public Object evaluate(Environment env) { 482 List l = Cascade.convertTo(arg.evaluate(env), List.class); 481 List<?> l = Cascade.convertTo(arg.evaluate(env), List.class); 483 482 if (l != null) 484 483 return l.size(); -
trunk/src/org/openstreetmap/josm/gui/preferences/PluginPreference.java
r6087 r6142 347 347 null // FIXME: provide help context 348 348 ); 349 } ;349 } 350 350 }); 351 351 } catch (Exception e) { -
trunk/src/org/openstreetmap/josm/gui/preferences/advanced/PreferencesTable.java
r6022 r6142 117 117 List<List<String>> data = llEditor.getData(); 118 118 @SuppressWarnings("unchecked") 119 Collection<Collection<String>> stgValue = (Collection) stg.getValue(); 119 Collection<Collection<String>> stgValue = (Collection<Collection<String>>) stg.getValue(); 120 120 if (!Preferences.equalArray(stgValue, data)) { 121 121 e.setValue(new Preferences.ListListSetting(data)); -
trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginListPanel.java
r6087 r6142 151 151 } 152 152 } 153 } ;153 } 154 154 155 155 -
trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetItems.java
r6114 r6142 578 578 try { 579 579 // TODO there must be a better way to parse a number like "+3" than this. 580 final int buttonvalue = ( (Number)NumberFormat.getIntegerInstance().parse(ai.replace("+", ""))).intValue();580 final int buttonvalue = (NumberFormat.getIntegerInstance().parse(ai.replace("+", ""))).intValue(); 581 581 if (auto_increment_selected == buttonvalue) aibutton.setSelected(true); 582 582 aibutton.addActionListener(new ActionListener() { -
trunk/src/org/openstreetmap/josm/io/GpxReader.java
r6117 r6142 409 409 link.text = urlname; 410 410 @SuppressWarnings({ "unchecked", "rawtypes" }) 411 Collection<GpxLink> links = (Collection) attr.get(META_LINKS); 411 Collection<GpxLink> links = (Collection<GpxLink>) attr.get(META_LINKS); 412 412 links.add(link); 413 413 } -
trunk/src/org/openstreetmap/josm/io/GpxWriter.java
r6070 r6142 82 82 if (key.equals(META_LINKS)) { 83 83 @SuppressWarnings("unchecked") 84 Collection<GpxLink> lValue = obj.getCollection(key); 84 Collection<GpxLink> lValue = (Collection<GpxLink>) obj.getCollection(key); 85 85 if (lValue != null) { 86 86 for (GpxLink link : lValue) { -
trunk/src/org/openstreetmap/josm/io/remotecontrol/AddTagsDialog.java
r6104 r6142 135 135 final Class<?>[] types = {Boolean.class, String.class, Object.class, ExistingValues.class}; 136 136 @Override 137 public Class getColumnClass(int c) { 137 public Class<?> getColumnClass(int c) { 138 138 return types[c]; 139 139 } -
trunk/src/org/openstreetmap/josm/io/remotecontrol/RequestProcessor.java
r6091 r6142 385 385 RequestHandler handler = null; 386 386 try { 387 Class c = handlers.get(cmd); 387 Class<?> c = handlers.get(cmd); 388 388 if (c==null) return null; 389 389 handler = handlers.get(cmd).newInstance(); -
trunk/src/org/openstreetmap/josm/io/session/SessionWriter.java
r6093 r6142 73 73 if (exporterClass == null) return null; 74 74 try { 75 @SuppressWarnings("unchecked") 76 Constructor<? extends SessionLayerExporter> constructor = (Constructor) exporterClass.getConstructor(layerClass); 75 Constructor<? extends SessionLayerExporter> constructor = exporterClass.getConstructor(layerClass); 77 76 return constructor.newInstance(layer); 78 77 } catch (Exception e) { -
trunk/src/org/openstreetmap/josm/tools/Diff.java
r6084 r6142 816 816 817 817 for (int i = 0; i < data.length; ++i) { 818 Integer ir = (Integer)h.get(data[i]);818 Integer ir = h.get(data[i]); 819 819 if (ir == null) { 820 820 h.put(data[i],new Integer(equivs[i] = equiv_max++)); -
trunk/src/org/openstreetmap/josm/tools/ExifReader.java
r6127 r6142 51 51 } 52 52 53 @SuppressWarnings("unchecked")public static Integer readOrientation(File filename) throws ParseException {53 public static Integer readOrientation(File filename) throws ParseException { 54 54 Integer orientation = null; 55 55 try { -
trunk/src/org/openstreetmap/josm/tools/LanguageInfo.java
r6070 r6142 18 18 /** The standard english texts */ 19 19 ENGLISH 20 } ;20 } 21 21 22 22 /** -
trunk/src/org/openstreetmap/josm/tools/TextTagParser.java
r6085 r6142 110 110 private void skipSign() { 111 111 char c; 112 boolean signFound = false; ;112 boolean signFound = false; 113 113 while (pos < n) { 114 114 c = data.charAt(pos);
Note:
See TracChangeset
for help on using the changeset viewer.