Ignore:
Timestamp:
2016-06-02T00:26:31+02:00 (7 years ago)
Author:
Don-vip
Message:

sonar - squid:S1182 - Classes that override "clone" should be "Cloneable" and call "super.clone()"

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/CopyList.java

    r9997 r10309  
    1818 * @param <E> the type of elements in this list
    1919 */
    20 public final class CopyList<E> extends AbstractList<E> implements RandomAccess, Cloneable {
     20public final class CopyList<E> extends AbstractList<E> implements RandomAccess {
    2121    private E[] array;
    2222    private int size;
     
    113113
    114114    // helpers:
    115     /**
    116      * Returns another independent copy-on-write copy of this <tt>List</tt>
    117      * instance. Neither the elements nor the backing storage are copied.
    118      *
    119      * @return a clone of this <tt>CopyList</tt> instance
    120      */
    121     @Override
    122     public Object clone() {
    123         return new CopyList<>(array, size);
    124     }
    125115
    126116    private void rangeCheck(int index) {
Note: See TracChangeset for help on using the changeset viewer.