Changeset 13726 in osm for applications/editors


Ignore:
Timestamp:
2009-02-14T14:38:04+01:00 (16 years ago)
Author:
stoecker
Message:

Suppress warning

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/util/LayerUtil.java

    r13497 r13726  
    2020     * @return the layer or <code>null</code>.
    2121     */
     22    @SuppressWarnings("unchecked")
    2223    public static <LayerType extends Layer> LayerType findGpsLayer(String layerName, Class<LayerType> layerType) {
    23         LayerType result = null;
     24        Layer result = null;
    2425        if(Main.map != null && Main.map.mapView != null) {
    2526            for(Layer layer : Main.map.mapView.getAllLayers()) {
    2627                if(layerName.equals(layer.name) && layerType.isAssignableFrom(layer.getClass())) {
    27                     result = (LayerType) layer;
     28                    result = layer;
    2829                    break;
    2930                }
    3031            }
    3132        }
    32         return result;
     33        return (LayerType) result;
    3334    }
    34 
    3535}
Note: See TracChangeset for help on using the changeset viewer.