Ignore:
Timestamp:
2014-04-26T17:39:23+02:00 (11 years ago)
Author:
Don-vip
Message:

see #8465 - use diamond operator where applicable

Location:
trunk/src/org/openstreetmap/josm/gui/download
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/download/BookmarkList.java

    r7001 r7005  
    5252         */
    5353        public Bookmark(Collection<String> list) throws NumberFormatException, IllegalArgumentException {
    54             List<String> array = new ArrayList<String>(list);
     54            List<String> array = new ArrayList<>(list);
    5555            if(array.size() < 5)
    5656                throw new IllegalArgumentException(tr("Wrong number of arguments for bookmark"));
     
    167167        Collection<Collection<String>> args = Main.pref.getArray("bookmarks", null);
    168168        if(args != null) {
    169             LinkedList<Bookmark> bookmarks = new LinkedList<Bookmark>();
     169            LinkedList<Bookmark> bookmarks = new LinkedList<>();
    170170            for(Collection<String> entry : args) {
    171171                try {
     
    184184            File bookmarkFile = new File(Main.pref.getPreferencesDir(),"bookmarks");
    185185            try {
    186                 LinkedList<Bookmark> bookmarks = new LinkedList<Bookmark>();
     186                LinkedList<Bookmark> bookmarks = new LinkedList<>();
    187187                if (bookmarkFile.exists()) {
    188188                    Main.info("Try loading obsolete bookmarks file");
     
    240240     */
    241241    public final void save() {
    242         LinkedList<Collection<String>> coll = new LinkedList<Collection<String>>();
     242        LinkedList<Collection<String>> coll = new LinkedList<>();
    243243        for (Object o : ((DefaultListModel<Bookmark>)getModel()).toArray()) {
    244244            String[] array = new String[5];
  • trunk/src/org/openstreetmap/josm/gui/download/DownloadDialog.java

    r6890 r7005  
    6767
    6868    protected SlippyMapChooser slippyMapChooser;
    69     protected final List<DownloadSelection> downloadSelections = new ArrayList<DownloadSelection>();
     69    protected final List<DownloadSelection> downloadSelections = new ArrayList<>();
    7070    protected final JTabbedPane tpDownloadAreaSelectors = new JTabbedPane();
    7171    protected JCheckBox cbNewLayer;
  • trunk/src/org/openstreetmap/josm/gui/download/PlaceSelection.java

    r6990 r7005  
    110110        cbSearchExpression = new HistoryComboBox();
    111111        cbSearchExpression.setToolTipText(tr("Enter a place name to search for"));
    112         List<String> cmtHistory = new LinkedList<String>(Main.pref.getCollection(HISTORY_KEY, new LinkedList<String>()));
     112        List<String> cmtHistory = new LinkedList<>(Main.pref.getCollection(HISTORY_KEY, new LinkedList<String>()));
    113113        Collections.reverse(cmtHistory);
    114114        cbSearchExpression.setPossibleItems(cmtHistory);
     
    195195        private StringBuffer description = null;
    196196        private int depth = 0;
    197         private List<SearchResult> data = new LinkedList<SearchResult>();
     197        private List<SearchResult> data = new LinkedList<>();
    198198
    199199        /**
     
    389389
    390390        public NamedResultTableModel(ListSelectionModel selectionModel) {
    391             data = new ArrayList<SearchResult>();
     391            data = new ArrayList<>();
    392392            this.selectionModel = selectionModel;
    393393        }
     
    408408                this.data.clear();
    409409            } else {
    410                 this.data  =new ArrayList<SearchResult>(data);
     410                this.data = new ArrayList<>(data);
    411411            }
    412412            fireTableDataChanged();
Note: See TracChangeset for help on using the changeset viewer.