Ignore:
Timestamp:
2016-03-13T16:31:38+01:00 (8 years ago)
Author:
Don-vip
Message:

sonar - code style + javadoc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/Storage.java

    r9975 r9980  
    144144        this.hash = ha;
    145145        int cap = 1 << (int) (Math.ceil(Math.log(capacity/LOAD_FACTOR) / Math.log(2)));
    146         @SuppressWarnings("unchecked") T[] newData = (T[]) new Object[cap];
     146        @SuppressWarnings("unchecked")
     147        T[] newData = (T[]) new Object[cap];
    147148        data = newData;
    148149        mask = data.length - 1;
     
    175176    @Override
    176177    public synchronized boolean contains(Object o) {
    177         @SuppressWarnings("unchecked") T t = (T) o;
     178        @SuppressWarnings("unchecked")
     179        T t = (T) o;
    178180        int bucket = getBucket(hash, t);
    179181        return bucket >= 0;
     
    188190    @Override
    189191    public synchronized boolean remove(Object o) {
    190         @SuppressWarnings("unchecked") T t = (T) o;
     192        @SuppressWarnings("unchecked")
     193        T t = (T) o;
    191194        T tOrig = removeElem(t);
    192195        return tOrig != null;
     
    329332    private void ensureSpace() {
    330333        if (size > data.length*LOAD_FACTOR) { // rehash
    331             @SuppressWarnings("unchecked") T[] big = (T[]) new Object[data.length * 2];
     334            @SuppressWarnings("unchecked")
     335            T[] big = (T[]) new Object[data.length * 2];
    332336            int nMask = big.length - 1;
    333337
     
    387391        @Override
    388392        public boolean containsKey(Object o) {
    389             @SuppressWarnings("unchecked") K key = (K) o;
     393            @SuppressWarnings("unchecked")
     394            K key = (K) o;
    390395            int bucket = getBucket(fHash, key);
    391396            return bucket >= 0;
     
    399404        @Override
    400405        public T get(Object o) {
    401             @SuppressWarnings("unchecked") K key = (K) o;
     406            @SuppressWarnings("unchecked")
     407            K key = (K) o;
    402408            int bucket = getBucket(fHash, key);
    403409            return bucket < 0 ? null : data[bucket];
     
    414420            synchronized (Storage.this) {
    415421                modCount++;
    416                 @SuppressWarnings("unchecked") K key = (K) o;
     422                @SuppressWarnings("unchecked")
     423                K key = (K) o;
    417424                int bucket = getBucket(fHash, key);
    418425
Note: See TracChangeset for help on using the changeset viewer.