Ignore:
Timestamp:
2014-10-04T17:28:45+02:00 (10 years ago)
Author:
donvip
Message:

[josm_plugins] fix various compilation warnings

Location:
applications/editors/josm/plugins/opendata/modules
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/opendata/modules/fr.datagouvfr/src/org/openstreetmap/josm/plugins/opendata/modules/fr/datagouvfr/datasets/administration/GeoFlaHandler.java

    r30340 r30701  
    178178       
    179179        private Pair<String, URL> getGeoflaURL(String name, String urlSuffix) throws MalformedURLException {
    180                 return new Pair<String, URL>(name, new URL("http://professionnels.ign.fr/sites/default/files/"+urlSuffix));
     180                return new Pair<>(name, new URL("http://professionnels.ign.fr/sites/default/files/"+urlSuffix));
    181181        }
    182182
    183183        @Override
    184184        public List<Pair<String, URL>> getDataURLs() {
    185                 List<Pair<String, URL>> result = new ArrayList<Pair<String,URL>>();
     185                List<Pair<String, URL>> result = new ArrayList<>();
    186186                try {
    187187                        result.add(getGeoflaURL("Départements France métropolitaine et Corse", "GEOFLADept_FR_Corse_AV_L93.zip"));
  • applications/editors/josm/plugins/opendata/modules/fr.datagouvfr/src/org/openstreetmap/josm/plugins/opendata/modules/fr/datagouvfr/datasets/agriculture/RegistreParcellaireHandler.java

    r30340 r30701  
    117117
    118118        private Pair<String, URL> getRpgURL(String number, String name) throws MalformedURLException {
    119                 return new Pair<String, URL>(number+" - "+name, new URL("http://www.data.gouv.fr/var/download/ign/RPG_2010_"+number+".ZIP"));
     119                return new Pair<>(number+" - "+name, new URL("http://www.data.gouv.fr/var/download/ign/RPG_2010_"+number+".ZIP"));
    120120        }
    121121       
    122122        @Override
    123123        public List<Pair<String, URL>> getDataURLs() {
    124                 List<Pair<String, URL>> result = new ArrayList<Pair<String,URL>>();
     124                List<Pair<String, URL>> result = new ArrayList<>();
    125125                try {
    126126                        for (FrenchAdministrativeUnit dpt : FrenchAdministrativeUnit.allDepartments) {
  • applications/editors/josm/plugins/opendata/modules/fr.datagouvfr/src/org/openstreetmap/josm/plugins/opendata/modules/fr/datagouvfr/datasets/ecologie/AssainissementHandler.java

    r30340 r30701  
    3838        @Override
    3939        public List<Pair<String, URL>> getDataURLs() {
    40                 List<Pair<String, URL>> result = new ArrayList<Pair<String,URL>>();
     40                List<Pair<String, URL>> result = new ArrayList<>();
    4141                try {
    42                         result.add(new Pair<String, URL>("Données 2009", new URL("http://www.assainissement.developpement-durable.gouv.fr/telecharger2.php")));
    43                         result.add(new Pair<String, URL>("Données 2010", new URL("http://www.assainissement.developpement-durable.gouv.fr/telecharger2_2010.php")));
    44                         result.add(new Pair<String, URL>("Données 2011", new URL("http://www.assainissement.developpement-durable.gouv.fr/telecharger2_2011.php")));
     42                        result.add(new Pair<>("Données 2009", new URL("http://www.assainissement.developpement-durable.gouv.fr/telecharger2.php")));
     43                        result.add(new Pair<>("Données 2010", new URL("http://www.assainissement.developpement-durable.gouv.fr/telecharger2_2010.php")));
     44                        result.add(new Pair<>("Données 2011", new URL("http://www.assainissement.developpement-durable.gouv.fr/telecharger2_2011.php")));
    4545                } catch (MalformedURLException e) {
    4646                        e.printStackTrace();
     
    5353            private Node nodeWithKeys;
    5454           
    55             private final Set<String> interestingKeys = new HashSet<String>();
     55            private final Set<String> interestingKeys = new HashSet<>();
    5656           
    5757        public InternalOdsHandler() {
  • applications/editors/josm/plugins/opendata/modules/fr.datagouvfr/src/org/openstreetmap/josm/plugins/opendata/modules/fr/datagouvfr/datasets/ecologie/ForetsPubliquesHandler.java

    r30340 r30701  
    109109        @Override
    110110        public List<Pair<String, URL>> getDataURLs() {
    111                 List<Pair<String, URL>> result = new ArrayList<Pair<String,URL>>();
     111                List<Pair<String, URL>> result = new ArrayList<>();
    112112                try {
    113113                        for (FrenchAdministrativeUnit region : FrenchAdministrativeUnit.allRegions) {
     
    123123
    124124        private Pair<String, URL> getForetURL(String code, String regionName) throws MalformedURLException {
    125                 return new Pair<String, URL>("PublicForests_"+regionName, new URL(FRENCH_PORTAL+"var/download/"+"for_publ_v2011_reg"+code+".zip"));
     125                return new Pair<>("PublicForests_"+regionName, new URL(FRENCH_PORTAL+"var/download/"+"for_publ_v2011_reg"+code+".zip"));
    126126        }
    127127}
  • applications/editors/josm/plugins/opendata/modules/fr.datagouvfr/src/org/openstreetmap/josm/plugins/opendata/modules/fr/datagouvfr/datasets/ecologie/InventaireForestierNationalHandler.java

    r30340 r30701  
    8181        @Override
    8282        public List<Pair<String, URL>> getDataURLs() {
    83                 List<Pair<String, URL>> result = new ArrayList<Pair<String,URL>>();
     83                List<Pair<String, URL>> result = new ArrayList<>();
    8484                try {
    8585                        for (int year = 2010; year >= 2005; year--) {
     
    9494       
    9595        private Pair<String, URL> getIfnURL(int year, String name, String type) throws MalformedURLException {
    96                 return new Pair<String, URL>(name+" "+year, new URL("http://www.ifn.fr/spip/IMG/csv/placettes_"+type+"_"+year+".csv"));
     96                return new Pair<>(name+" "+year, new URL("http://www.ifn.fr/spip/IMG/csv/placettes_"+type+"_"+year+".csv"));
    9797        }
    9898}
  • applications/editors/josm/plugins/opendata/modules/fr.datagouvfr/src/org/openstreetmap/josm/plugins/opendata/modules/fr/datagouvfr/datasets/hydrologie/EauxDeSurfaceHandler.java

    r30340 r30701  
    9494        @Override
    9595        public List<Pair<String, URL>> getDataURLs() {
    96                 List<Pair<String, URL>> result = new ArrayList<Pair<String,URL>>();
     96                List<Pair<String, URL>> result = new ArrayList<>();
    9797                try {
    9898                        for (WaterAgency wa : waterAgencies) {
     
    106106
    107107        private Pair<String, URL> getDownloadURL(WaterAgency a) throws MalformedURLException {
    108                 return new Pair<String, URL>("SurfaceWater_"+a.name, new URL("http://www.rapportage.eaufrance.fr/sites/default/files/SIG/FR"+a.code+"_SW.zip"));
     108                return new Pair<>("SurfaceWater_"+a.name, new URL("http://www.rapportage.eaufrance.fr/sites/default/files/SIG/FR"+a.code+"_SW.zip"));
    109109        }
    110110       
  • applications/editors/josm/plugins/opendata/modules/fr.datagouvfr/src/org/openstreetmap/josm/plugins/opendata/modules/fr/datagouvfr/datasets/transport/Route500Handler.java

    r30340 r30701  
    4444    @Override
    4545    public List<Pair<String, URL>> getDataURLs() {
    46         List<Pair<String, URL>> result = new ArrayList<Pair<String,URL>>();
     46        List<Pair<String, URL>> result = new ArrayList<>();
    4747        try {
    4848            for (FrenchAdministrativeUnit dpt : FrenchAdministrativeUnit.allDepartments) {
     
    5858
    5959    private Pair<String, URL> getRoute500URL(String code, String name) throws MalformedURLException {
    60         return new Pair<String, URL>(name, new URL(OSMFR_PORTAL+"ROUTE500_1-1_SHP_LAMB93_D"+code+"_2012-11-21.7z"));
     60        return new Pair<>(name, new URL(OSMFR_PORTAL+"ROUTE500_1-1_SHP_LAMB93_D"+code+"_2012-11-21.7z"));
    6161    }
    6262}
  • applications/editors/josm/plugins/opendata/modules/fr.lemans/src/org/openstreetmap/josm/plugins/opendata/modules/fr/lemans/datasets/LeMansDataSetHandler.java

    r30340 r30701  
    7575        @Override
    7676        public List<Pair<String, URL>> getDataURLs() {
    77                 List<Pair<String, URL>> result = new ArrayList<Pair<String,URL>>();
     77                List<Pair<String, URL>> result = new ArrayList<>();
    7878                try {
    79                         if (kmzUuid != null && !kmzUuid.isEmpty()) result.add(new Pair<String, URL>(getName() + " (KMZ)", new URL(PORTAL + "download.do?uuid=" + kmzUuid)));
    80                         if (shpUuid != null && !shpUuid.isEmpty()) result.add(new Pair<String, URL>(getName() + " (SHP)", new URL(PORTAL + "download.do?uuid=" + shpUuid)));
     79                        if (kmzUuid != null && !kmzUuid.isEmpty()) result.add(new Pair<>(getName() + " (KMZ)", new URL(PORTAL + "download.do?uuid=" + kmzUuid)));
     80                        if (shpUuid != null && !shpUuid.isEmpty()) result.add(new Pair<>(getName() + " (SHP)", new URL(PORTAL + "download.do?uuid=" + shpUuid)));
    8181                } catch (MalformedURLException e) {
    8282                        e.printStackTrace();
  • applications/editors/josm/plugins/opendata/modules/fr.paris/src/org/openstreetmap/josm/plugins/opendata/modules/fr/paris/datasets/urbanisme/SanisettesHandler.java

    r30340 r30701  
    5050        public void updateDataSet(DataSet ds) {
    5151               
    52                 List<Way> sourceWays = new ArrayList<Way>(ds.getWays());
    53                 List<List<Way>> waysToCombine = new ArrayList<List<Way>>();
     52                List<Way> sourceWays = new ArrayList<>(ds.getWays());
     53                List<List<Way>> waysToCombine = new ArrayList<>();
    5454               
    5555                for (Iterator<Way> it = sourceWays.iterator(); it.hasNext();) {
     
    5757                        it.remove();
    5858                        if (!wayProcessed(w, waysToCombine)) {
    59                                 List<Way> list = new ArrayList<Way>();
     59                                List<Way> list = new ArrayList<>();
    6060                                list.add(w);
    6161                                boolean finished = false;
    62                                 List<Way> sourceWays2 = new ArrayList<Way>(sourceWays);
     62                                List<Way> sourceWays2 = new ArrayList<>(sourceWays);
    6363                                while (!finished) {
    6464                                        int before = list.size();
  • applications/editors/josm/plugins/opendata/modules/fr.toulouse/src/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/ToulouseModule.java

    r30340 r30701  
    113113   
    114114    private static final Collection<Relation> getBoundaries(int admin_level) {
    115         Collection<Relation> result = new TreeSet<Relation>(new Comparator<Relation>() {
     115        Collection<Relation> result = new TreeSet<>(new Comparator<Relation>() {
    116116            @Override
    117117            public int compare(Relation o1, Relation o2) {
  • applications/editors/josm/plugins/opendata/modules/fr.toulouse/src/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/datasets/transport/PistesCyclablesHandler.java

    r30340 r30701  
    1818public class PistesCyclablesHandler extends ToulouseDataSetHandler {
    1919
    20     protected final Map<String, Collection<String>> map = new HashMap<String, Collection<String>>();
     20    protected final Map<String, Collection<String>> map = new HashMap<>();
    2121   
    2222    private String streetField;
  • applications/editors/josm/plugins/opendata/modules/fr.toulouse/src/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/datasets/urbanisme/NumerosRueHandler.java

    r30340 r30701  
    2727    @Override
    2828    public void updateDataSet(DataSet ds) {
    29         Map<String, Relation> associatedStreets = new HashMap<String, Relation>();
     29        Map<String, Relation> associatedStreets = new HashMap<>();
    3030       
    3131        for (Node n : ds.getNodes()) {
  • applications/editors/josm/plugins/opendata/modules/fr.toulouse/src/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/datasets/urbanisme/VoirieHandler.java

    r30340 r30701  
    1717public class VoirieHandler extends ToulouseDataSetHandler {
    1818
    19     protected final Map<String, Collection<String>> map = new HashMap<String, Collection<String>>();
     19    protected final Map<String, Collection<String>> map = new HashMap<>();
    2020   
    2121    private String streetField;
     
    6565    @Override
    6666    public void updateDataSet(DataSet ds) {
    67         Map<String, Relation> associatedStreets = new HashMap<String, Relation>();
     67        Map<String, Relation> associatedStreets = new HashMap<>();
    6868       
    6969        for (Way w : ds.getWays()) {
Note: See TracChangeset for help on using the changeset viewer.