Changeset 11336 in josm for trunk


Ignore:
Timestamp:
2016-11-28T19:26:21+01:00 (3 years ago)
Author:
simon04
Message:

see #13799 see #14040 - Make TestError#getPrimitives return an unmodifiable collection

This also reverts r11307.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/validation/TestError.java

    r11330 r11336  
    33
    44import java.text.MessageFormat;
    5 import java.util.ArrayList;
    65import java.util.Arrays;
    76import java.util.Collection;
     
    119118         */
    120119        public Builder primitives(OsmPrimitive... primitives) {
    121             return primitives(new ArrayList<>(Arrays.asList(primitives)));
     120            return primitives(Arrays.asList(primitives));
    122121        }
    123122
     
    262261     */
    263262    public Collection<? extends OsmPrimitive> getPrimitives() {
    264         return primitives;
     263        return Collections.unmodifiableCollection(primitives);
    265264    }
    266265
     
    400399     */
    401400    public Collection<?> getHighlighted() {
    402         return highlighted;
     401        return Collections.unmodifiableCollection(highlighted);
    403402    }
    404403
Note: See TracChangeset for help on using the changeset viewer.