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/surveyor/src
Files:
7 edited

Legend:

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

    r26509 r30737  
    7373     */
    7474    private static List<SurveyorActionDescription> createFromOneElement(SurveyorActionDescription actionDescription) {
    75         List<SurveyorActionDescription> list = new ArrayList<SurveyorActionDescription>();
     75        List<SurveyorActionDescription> list = new ArrayList<>();
    7676        list.add(actionDescription);
    7777        return list;
  • applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/SurveyorActionDescription.java

    r13497 r30737  
    5151        super();
    5252        this.actionClass = actionClass;
    53         this.params = new ArrayList<String>();
     53        this.params = new ArrayList<>();
    5454        for (int index = 0; index < params.length; index++) {
    5555            this.params.add(params[index]);
  • applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/SurveyorActionFactory.java

    r13497 r30737  
    1818 */
    1919public class SurveyorActionFactory {
    20     private static Map<String, SurveyorAction>actionCache = new HashMap<String, SurveyorAction>();
     20    private static Map<String, SurveyorAction>actionCache = new HashMap<>();
    2121    public static final String DEFAULT_PACKAGE = SurveyorActionFactory.class.getPackage().getName() + ".action";
    2222
  • applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/SurveyorComponent.java

    r30646 r30737  
    4848    public SurveyorComponent() {
    4949        super();
    50         hotKeys = new HashSet<String>();
     50        hotKeys = new HashSet<>();
    5151        setLayout(new BorderLayout());
    5252        streetLabel = new JLabel(tr("Way: "));
     
    132132            e.printStackTrace();
    133133        }
    134         List<SurveyorActionDescription> actions = new ArrayList<SurveyorActionDescription>();
     134        List<SurveyorActionDescription> actions = new ArrayList<>();
    135135        while(parser.hasNext()) {
    136136            Object object = parser.next();
  • applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/SurveyorShowAction.java

    r30646 r30737  
    144144        SurveyorComponent surveyorComponent = null;
    145145        parser.start(new BufferedReader(new InputStreamReader(in)));
    146         List<SurveyorActionDescription> actions = new ArrayList<SurveyorActionDescription>();
     146        List<SurveyorActionDescription> actions = new ArrayList<>();
    147147        while(parser.hasNext()) {
    148148            Object object = parser.next();
     
    154154                ((ButtonDescription)object).setActions(actions);
    155155                surveyorComponent.addButton(((ButtonDescription)object));
    156                 actions = new ArrayList<SurveyorActionDescription>();
     156                actions = new ArrayList<>();
    157157            } else if (object instanceof SurveyorActionDescription) {
    158158                //System.out.println("SurveyorActionDescription " + object);
  • applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/action/SetNodeAction.java

    r30646 r30737  
    3838    @Override
    3939    public void setParameters(List<String> parameters) {
    40         keyValues = new ArrayList<Pair<String, String>>();
     40        keyValues = new ArrayList<>();
    4141        int pos;
    4242        String key;
     
    4747                key = keyValuePair.substring(0, pos);
    4848                value = keyValuePair.substring(pos + 1);
    49                 keyValues.add(new Pair<String, String>(key, value));
     49                keyValues.add(new Pair<>(key, value));
    5050            } else {
    5151                System.err.println("SetNodeAction: ignoring invalid key value pair: " + keyValuePair);
  • applications/editors/josm/plugins/surveyor/src/org/dinopolis/util/io/Tokenizer.java

    r30646 r30737  
    730730  {
    731731    int token = nextToken();
    732     List<String> list = new ArrayList<String>();
     732    List<String> list = new ArrayList<>();
    733733    String word = "";
    734734//    while(token != Tokenizer.EOF)
     
    790790      Iterator<String> iterator = list.iterator();
    791791      String value;
    792       List<String> new_list = new ArrayList<String>();
     792      List<String> new_list = new ArrayList<>();
    793793      while(iterator.hasNext())
    794794      {
Note: See TracChangeset for help on using the changeset viewer.