Changeset 9703 in josm for trunk/src


Ignore:
Timestamp:
2016-02-01T10:47:51+01:00 (8 years ago)
Author:
simon04
Message:

see #12472 - Fix warnings identified by error-prone

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

Legend:

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

    r9246 r9703  
    412412        @Override
    413413        public T remove(Object o) {
    414             modCount++;
    415             @SuppressWarnings("unchecked") K key = (K) o;
    416             int bucket = getBucket(fHash, key);
    417 
    418             return bucket < 0 ? null : doRemove(bucket);
     414            synchronized (Storage.this) {
     415                modCount++;
     416                @SuppressWarnings("unchecked") K key = (K) o;
     417                int bucket = getBucket(fHash, key);
     418
     419                return bucket < 0 ? null : doRemove(bucket);
     420            }
    419421        }
    420422
  • trunk/src/org/openstreetmap/josm/gui/SideButton.java

    r9668 r9703  
    5757                @Override
    5858                public void propertyChange(PropertyChangeEvent evt) {
    59                     if (evt.getPropertyName() == javax.swing.Action.SMALL_ICON) {
     59                    if (javax.swing.Action.SMALL_ICON.equals(evt.getPropertyName())) {
    6060                        fixIcon(null);
    6161                    }
  • trunk/src/org/openstreetmap/josm/io/NmeaReader.java

    r9214 r9703  
    5050        public String getType() {
    5151            return this.type;
    52         }
    53 
    54         public boolean equals(String type) {
    55             return this.type.equals(type);
    5652        }
    5753    }
Note: See TracChangeset for help on using the changeset viewer.