Ignore:
Timestamp:
2014-10-18T23:07:52+02:00 (10 years ago)
Author:
donvip
Message:

[josm_plugins] fix Java 7 / unused code warnings

Location:
applications/editors/josm/plugins/roadsigns/src/org/openstreetmap/josm/plugins/roadsigns
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/roadsigns/src/org/openstreetmap/josm/plugins/roadsigns/ParametrizedString.java

    r22420 r30737  
    2222 */
    2323public class ParametrizedString {
    24     final List<StringOrParameter> token = new ArrayList<StringOrParameter>();
     24    final List<StringOrParameter> token = new ArrayList<>();
    2525
    2626    /**
  • applications/editors/josm/plugins/roadsigns/src/org/openstreetmap/josm/plugins/roadsigns/RoadSignInputDialog.java

    r30532 r30737  
    166166
    167167    private Command createCommand(Collection<OsmPrimitive> selPrim) {
    168         List<Command> cmds = new LinkedList<Command>();
     168        List<Command> cmds = new LinkedList<>();
    169169        for (int i=0; i<previewModel.getRowCount(); i++) {
    170170            String key = (String) previewModel.getValueAt(i, 0);
     
    272272     */
    273273    public class SignSelection  {
    274         private final LinkedList<SignCombination> combos=new LinkedList<SignCombination>();
     274        private final LinkedList<SignCombination> combos=new LinkedList<>();
    275275
    276276        public void remove(SignCombination sc) {
     
    333333                for (SignWrapper sw : sc.signs) {
    334334                    if (swFind == sw) {
    335                         return new Pair<Integer, Integer>(selIdx, combIdx);
     335                        return new Pair<>(selIdx, combIdx);
    336336                    }
    337337                    combIdx++;
     
    378378
    379379        public SignCombination() {
    380             signs = new LinkedList<SignWrapper>();
     380            signs = new LinkedList<>();
    381381        }
    382382
     
    428428        String signRef;
    429429        JPanel paramsPanel;
    430         Map<String, String> paramValues = new HashMap<String, String>();
     430        Map<String, String> paramValues = new HashMap<>();
    431431        public SignWrapper(Sign sign) {
    432432            this.sign = sign;
     
    575575
    576576    public class PreviewTableModel extends AbstractTableModel {
    577         private List<String> keys = new ArrayList<String>();
    578         private List<String> values = new ArrayList<String>();
     577        private List<String> keys = new ArrayList<>();
     578        private List<String> values = new ArrayList<>();
    579579
    580580        int rows=3;
     
    607607         */
    608608        public void update() {
    609             final TreeMap<String, String> map= new TreeMap<String, String>();
     609            final TreeMap<String, String> map= new TreeMap<>();
    610610            String traffic_sign = "";
    611611
    612612            for (SignCombination sc : sel.combos) {
    613                 final Map<String, String> env = new HashMap<String, String>();
     613                final Map<String, String> env = new HashMap<>();
    614614                String combo_traffic_sign = "";
    615615
     
    621621                    String key;
    622622                    String default_value;
    623                     List<String> values = new ArrayList<String>();
    624                     List<String> conditions = new ArrayList<String>();
     623                    List<String> values = new ArrayList<>();
     624                    List<String> conditions = new ArrayList<>();
    625625                    //String ident;
    626626                    public TagEvaluater(Tag t) {
     
    653653                            return Collections.singletonMap(key, value);
    654654                        else {
    655                             Map<String, String> result = new HashMap<String, String>();
     655                            Map<String, String> result = new HashMap<>();
    656656                            for (String c : conditions) {
    657657                                result.put(key+":"+c, value);
     
    662662                }
    663663
    664                 Map<String, TagEvaluater> tags = new LinkedHashMap<String, TagEvaluater>();
     664                Map<String, TagEvaluater> tags = new LinkedHashMap<>();
    665665                for (SignWrapper sw : sc.signs) {
    666666                    for (Map.Entry<String,String> entry : sw.paramValues.entrySet()) {
  • applications/editors/josm/plugins/roadsigns/src/org/openstreetmap/josm/plugins/roadsigns/RoadSignsPlugin.java

    r30495 r30737  
    157157            Collection<String> customIconDirs = null;
    158158            if (customIconDirsStr != null) {
    159                 customIconDirs = new ArrayList<String>(Arrays.asList(customIconDirsStr.split(",")));
     159                customIconDirs = new ArrayList<>(Arrays.asList(customIconDirsStr.split(",")));
    160160            } else {
    161161                customIconDirs = Main.pref.getCollection("plugin.roadsigns.icon.sources", null);
    162162            }
    163163            if (customIconDirs != null) {
    164                 customIconDirs = new ArrayList<String>(customIconDirs);
     164                customIconDirs = new ArrayList<>(customIconDirs);
    165165            } else {
    166                 customIconDirs = new ArrayList<String>();
     166                customIconDirs = new ArrayList<>();
    167167            }
    168168            // add icon directory relative to preset file
  • applications/editors/josm/plugins/roadsigns/src/org/openstreetmap/josm/plugins/roadsigns/RoadSignsReader.java

    r30319 r30737  
    234234        }
    235235        public void wireSupplements() throws XmlParsingException {
    236             Map<String, Sign> map = new HashMap<String, Sign>();
     236            Map<String, Sign> map = new HashMap<>();
    237237            for (Sign sign : allSigns) {
    238238                if (map.get(sign.id) != null)
     
    309309    public List<Sign> parse() throws SAXException, IOException {
    310310        SignParser parser = new SignParser();
    311         parser.allSigns = new ArrayList<Sign>();
    312         parser.supplementIds = new HashMap<Sign, List<String>>();
     311        parser.allSigns = new ArrayList<>();
     312        parser.supplementIds = new HashMap<>();
    313313        try {
    314314            SAXParserFactory factory = SAXParserFactory.newInstance();
     
    318318            String filterPref = Main.pref.get("plugin.roadsigns.preset.filter");
    319319            if (filterPref.equals("useful")) {
    320                 List<Sign> filtered = new ArrayList<Sign>();
     320                List<Sign> filtered = new ArrayList<>();
    321321                for (Sign s : parser.allSigns) {
    322322                    if (s.isUseful()) {
  • applications/editors/josm/plugins/roadsigns/src/org/openstreetmap/josm/plugins/roadsigns/Sign.java

    r29230 r30737  
    2727    public String name;
    2828    public String long_name;
    29     public List<Tag> tags = new ArrayList<Tag>();
    30     public List<Sign> supplements = new ArrayList<Sign>();
    31     public List<SignParameter> params = new ArrayList<SignParameter>();
     29    public List<Tag> tags = new ArrayList<>();
     30    public List<Sign> supplements = new ArrayList<>();
     31    public List<SignParameter> params = new ArrayList<>();
    3232    public boolean isSupplementing;
    3333    public String loc_wiki;
  • applications/editors/josm/plugins/roadsigns/src/org/openstreetmap/josm/plugins/roadsigns/javacc/ParamStringScanner.java

    r21967 r30737  
    1818    String val;
    1919    Token t;
    20     List<StringOrParameter> lst = new ArrayList<StringOrParameter>();
     20    List<StringOrParameter> lst = new ArrayList<>();
    2121    label_1:
    2222    while (true) {
  • applications/editors/josm/plugins/roadsigns/src/org/openstreetmap/josm/plugins/roadsigns/javacc/ParamStringScannerTokenManager.java

    r23192 r30737  
    11/* Generated By:JavaCC: Do not edit this line. ParamStringScannerTokenManager.java */
    22package org.openstreetmap.josm.plugins.roadsigns.javacc;
    3 import java.util.ArrayList;
    4 import java.util.List;
    5 import org.openstreetmap.josm.plugins.roadsigns.ParametrizedString.Prm;
    6 import org.openstreetmap.josm.plugins.roadsigns.ParametrizedString.Str;
    7 import org.openstreetmap.josm.plugins.roadsigns.ParametrizedString.StringOrParameter;
    83
    94/** Token Manager. */
Note: See TracChangeset for help on using the changeset viewer.