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

[josm_plugins] fix Java 7 / unused code warnings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/imagerycache/src/org/mapdb/BTreeMap.java

    r30532 r30737  
    114114
    115115    /** holds node level locks*/
    116     protected final LongConcurrentHashMap<Thread> nodeLocks = new LongConcurrentHashMap<Thread>();
     116    protected final LongConcurrentHashMap<Thread> nodeLocks = new LongConcurrentHashMap<>();
    117117
    118118    /** maximal node size allowed in this BTree*/
     
    963963    protected Entry<K, V> makeEntry(Object key, Object value) {
    964964        if(value instanceof ValRef) throw new InternalError();
    965         return new SimpleImmutableEntry<K, V>((K)key,  (V)value);
     965        return new SimpleImmutableEntry<>((K)key,  (V)value);
    966966    }
    967967
     
    13361336        if (fromKey == null || toKey == null)
    13371337            throw new NullPointerException();
    1338         return new SubMap<K,V>
     1338        return new SubMap<>
    13391339                ( this, fromKey, fromInclusive, toKey, toInclusive);
    13401340    }
     
    13451345        if (toKey == null)
    13461346            throw new NullPointerException();
    1347         return new SubMap<K,V>
     1347        return new SubMap<>
    13481348                (this, null, false, toKey, inclusive);
    13491349    }
     
    13541354        if (fromKey == null)
    13551355            throw new NullPointerException();
    1356         return new SubMap<K,V>
     1356        return new SubMap<>
    13571357                (this, fromKey, inclusive, null, false);
    13581358    }
     
    14211421    static final <E> List<E> toList(Collection<E> c) {
    14221422        // Using size() here would be a pessimization.
    1423         List<E> list = new ArrayList<E>();
     1423        List<E> list = new ArrayList<>();
    14241424        for (E e : c){
    14251425            list.add(e);
     
    15061506                                      E toElement,
    15071507                                      boolean toInclusive) {
    1508             return new KeySet<E>(m.subMap(fromElement, fromInclusive,
     1508            return new KeySet<>(m.subMap(fromElement, fromInclusive,
    15091509                    toElement,   toInclusive),hasValues);
    15101510        }
    15111511        @Override
    15121512                public NavigableSet<E> headSet(E toElement, boolean inclusive) {
    1513             return new KeySet<E>(m.headMap(toElement, inclusive),hasValues);
     1513            return new KeySet<>(m.headMap(toElement, inclusive),hasValues);
    15141514        }
    15151515        @Override
    15161516                public NavigableSet<E> tailSet(E fromElement, boolean inclusive) {
    1517             return new KeySet<E>(m.tailMap(fromElement, inclusive),hasValues);
     1517            return new KeySet<>(m.tailMap(fromElement, inclusive),hasValues);
    15181518        }
    15191519        @Override
     
    19371937                }
    19381938            }
    1939             return new SubMap<K,V>(m, fromKey, fromInclusive,
     1939            return new SubMap<>(m, fromKey, fromInclusive,
    19401940                    toKey, toInclusive);
    19411941        }
     
    19891989        @Override
    19901990        public NavigableSet<K> navigableKeySet() {
    1991             return new KeySet<K>((ConcurrentNavigableMap<K,Object>) this,m.hasValues);
     1991            return new KeySet<>((ConcurrentNavigableMap<K,Object>) this,m.hasValues);
    19921992        }
    19931993
     
    20322032        @Override
    20332033        public NavigableSet<K> keySet() {
    2034             return new KeySet<K>((ConcurrentNavigableMap<K,Object>) this, m.hasValues);
     2034            return new KeySet<>((ConcurrentNavigableMap<K,Object>) this, m.hasValues);
    20352035        }
    20362036
     
    20442044        @Override
    20452045        public Set<Entry<K, V>> entrySet() {
    2046             return new EntrySet<K, V>(this);
     2046            return new EntrySet<>(this);
    20472047        }
    20482048
     
    21232123        Engine snapshot = SnapshotEngine.createSnapshotFor(engine);
    21242124
    2125         return new BTreeMap<K, V>(snapshot,treeRecid, defaultSerializer);
     2125        return new BTreeMap<>(snapshot,treeRecid, defaultSerializer);
    21262126    }
    21272127
Note: See TracChangeset for help on using the changeset viewer.