Ignore:
Timestamp:
2016-03-13T17:25:42+01:00 (8 years ago)
Author:
Don-vip
Message:

fix some unused code warnings

Location:
trunk/src/org/openstreetmap/josm/data/projection
Files:
5 edited

Legend:

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

    r8378 r9981  
    33
    44public class ProjectionConfigurationException extends Exception {
    5 
    6     /**
    7      * Constructs a new {@code ProjectionConfigurationException}.
    8      */
    9     public ProjectionConfigurationException() {
    10         super();
    11     }
    125
    136    /**
  • trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2GridShift.java

    r9230 r9981  
    335335        subGridName = string;
    336336    }
    337 
    338     /**
    339      * Make this object a copy of the supplied GridShift
    340      * @param gs grid to copy data from
    341      */
    342     public void copy(NTV2GridShift gs) {
    343         this.lon = gs.lon;
    344         this.lat = gs.lat;
    345         this.lonShift = gs.lonShift;
    346         this.latShift = gs.latShift;
    347         this.lonAccuracy = gs.lonAccuracy;
    348         this.latAccuracy = gs.latAccuracy;
    349         this.latAccuracyAvailable = gs.latAccuracyAvailable;
    350         this.lonAccuracyAvailable = gs.lonAccuracyAvailable;
    351         this.subGridName = gs.subGridName;
    352     }
    353 
    354337}
  • trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2GridShiftFile.java

    r8870 r9981  
    6161 *
    6262 * @author Peter Yuill
    63  * Modifified for JOSM :
     63 * Modified for JOSM :
    6464 * - removed the RandomAccessFile mode (Pieren)
    6565 */
     
    267267        }
    268268        return sub;
    269     }
    270 
    271     public boolean isLoaded() {
    272         return topLevelSubGrid != null;
    273     }
    274 
    275     public void unload() {
    276         topLevelSubGrid = null;
    277269    }
    278270
     
    304296    }
    305297
    306     /**
    307      * Get a copy of the SubGrid tree for this file.
    308      *
    309      * @return a deep clone of the current SubGrid tree
    310      */
    311     public NTV2SubGrid[] getSubGridTree() {
    312         NTV2SubGrid[] clone = new NTV2SubGrid[topLevelSubGrid.length];
    313         for (int i = 0; i < topLevelSubGrid.length; i++) {
    314             clone[i] = (NTV2SubGrid) topLevelSubGrid[i].clone();
    315         }
    316         return clone;
    317     }
    318 
    319298    public String getFromEllipsoid() {
    320299        return fromEllipsoid;
  • trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2SubGrid.java

    r9067 r9981  
    3636 * - read grid file by single bytes. Workaround for a bug in some VM not supporting
    3737 *   file reading by group of 4 bytes from a jar file.
     38 * - removed the Cloneable interface
    3839 */
    39 public class NTV2SubGrid implements Cloneable, Serializable {
     40public class NTV2SubGrid implements Serializable {
    4041
    4142    private static final long serialVersionUID = 1L;
     
    276277    }
    277278
    278     public NTV2SubGrid getSubGrid(int index) {
    279         return (subGrid == null) ? null : subGrid[index];
    280     }
    281 
    282279    /**
    283280     * Set an array of Sub Grids of this sub grid
     
    324321
    325322    /**
    326      * Make a deep clone of this Sub Grid
    327      */
    328     @Override
    329     public Object clone() {
    330         NTV2SubGrid clone = null;
    331         try {
    332             clone = (NTV2SubGrid) super.clone();
    333             // Do a deep clone of the sub grids
    334             if (subGrid != null) {
    335                 clone.subGrid = new NTV2SubGrid[subGrid.length];
    336                 for (int i = 0; i < subGrid.length; i++) {
    337                     clone.subGrid[i] = (NTV2SubGrid) subGrid[i].clone();
    338                 }
    339             }
    340         } catch (CloneNotSupportedException cnse) {
    341             Main.warn(cnse);
    342         }
    343         return clone;
    344     }
    345 
    346     /**
    347323     * Get maximum latitude value
    348324     * @return maximum latitude
  • trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2Util.java

    r8510 r9981  
    1919 */
    2020package org.openstreetmap.josm.data.projection.datum;
    21 
    22 import org.openstreetmap.josm.Main;
    2321
    2422/**
     
    104102        return Double.longBitsToDouble(l);
    105103    }
    106 
    107     /**
    108      * Does the current VM support the New IO api
    109      * @return true or false
    110      */
    111     public static boolean isNioAvailable() {
    112         boolean nioAvailable = false;
    113         try {
    114             Class.forName("java.nio.channels.FileChannel");
    115             nioAvailable = true;
    116         } catch (NoClassDefFoundError | ClassNotFoundException cnfe) {
    117             Main.info(cnfe.getMessage());
    118         }
    119         return nioAvailable;
    120     }
    121104}
Note: See TracChangeset for help on using the changeset viewer.