Changeset 11105 in josm for trunk


Ignore:
Timestamp:
2016-10-08T21:50:48+02:00 (9 years ago)
Author:
Don-vip
Message:

sonar - fix various issues

Location:
trunk
Files:
3 edited

Legend:

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

    r10957 r11105  
    108108    // For easy access when inherited
    109109    protected transient Insets contentInsets = new Insets(10, 5, 0, 5);
    110     protected List<JButton> buttons = new ArrayList<>();
     110    protected transient List<JButton> buttons = new ArrayList<>();
    111111
    112112    /**
  • trunk/src/org/openstreetmap/josm/gui/dialogs/OsmIdSelectionDialog.java

    r10717 r11105  
    1313import java.util.Collection;
    1414import java.util.Collections;
     15import java.util.EnumSet;
    1516import java.util.LinkedList;
    1617import java.util.List;
    17 import java.util.Set;
    1818import java.util.stream.Collectors;
    1919
     
    206206                    .collect(Collectors.joining(", "));
    207207            tfId.tryToPasteFrom(parsedText);
    208             final Set<OsmPrimitiveType> types = ids.stream().map(SimplePrimitiveId::getType).collect(Collectors.toSet());
     208            final EnumSet<OsmPrimitiveType> types = ids.stream().map(SimplePrimitiveId::getType).collect(
     209                    Collectors.toCollection(() -> EnumSet.noneOf(OsmPrimitiveType.class)));
    209210            if (types.size() == 1) {
    210211                // select corresponding type
  • trunk/test/unit/org/openstreetmap/josm/data/osm/ChangesetCacheTest.java

    r11104 r11105  
    5555
    5656    @Test
    57     public void updateGetRemoveCycle() {
     57    public void testUpdateGetRemoveCycle() {
    5858        ChangesetCache cache = ChangesetCache.getInstance();
    5959        cache.clear();
     
    6868
    6969    @Test
    70     public void updateTwice() {
     70    public void testUpdateTwice() {
    7171        ChangesetCache cache = ChangesetCache.getInstance();
    7272        cache.clear();
     
    9494
    9595    @Test
    96     public void contains() throws ReflectiveOperationException {
     96    public void testContains() throws ReflectiveOperationException {
    9797        ChangesetCache cache = ChangesetCache.getInstance();
    9898        getListeners(cache).clear();
     
    112112
    113113    @Test
    114     public void fireingEventsAddAChangeset() throws ReflectiveOperationException {
     114    public void testFireingEventsAddAChangeset() throws ReflectiveOperationException {
    115115        ChangesetCache cache = ChangesetCache.getInstance();
    116116        cache.clear();
     
    134134
    135135    @Test
    136     public void fireingEventsUpdateChangeset() throws ReflectiveOperationException {
     136    public void testFireingEventsUpdateChangeset() throws ReflectiveOperationException {
    137137        ChangesetCache cache = ChangesetCache.getInstance();
    138138        cache.clear();
     
    158158
    159159    @Test
    160     public void fireingEventsRemoveChangeset() throws ReflectiveOperationException {
     160    public void testFireingEventsRemoveChangeset() throws ReflectiveOperationException {
    161161        ChangesetCache cache = ChangesetCache.getInstance();
    162162        cache.clear();
Note: See TracChangeset for help on using the changeset viewer.