Ignore:
Timestamp:
2013-09-08T05:14:39+02:00 (11 years ago)
Author:
Don-vip
Message:

Make some more defensive copies of user-supplied arrays, javadoc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2SubGrid.java

    r6135 r6222  
    2323import java.io.InputStream;
    2424import java.io.Serializable;
     25
     26import org.openstreetmap.josm.tools.Utils;
    2527
    2628/**
     
    216218     * @param gs GridShift object containing the coordinate to shift and the shift values
    217219     * @return the GridShift object supplied, with values updated.
    218      * @throws IOException
    219220     */
    220221    public NTV2GridShift interpolateGridShift(NTV2GridShift gs) {
     
    281282     */
    282283    public void setSubGridArray(NTV2SubGrid[] subGrid) {
    283         this.subGrid = subGrid;
     284        this.subGrid = Utils.copyArray(subGrid);
    284285    }
    285286
     
    369370        return minLon;
    370371    }
    371 
    372372}
Note: See TracChangeset for help on using the changeset viewer.