Ignore:
Timestamp:
2015-10-13T23:50:14+02:00 (4 years ago)
Author:
Don-vip
Message:

sonar - squid:S2325 - "private" methods that don't access instance data should be "static"

Location:
trunk/src/org/openstreetmap/josm/io
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/GpxExporter.java

    r8849 r8870  
    2727import org.openstreetmap.josm.data.gpx.GpxConstants;
    2828import org.openstreetmap.josm.data.gpx.GpxData;
    29 import org.openstreetmap.josm.data.osm.DataSet;
    3029import org.openstreetmap.josm.gui.ExtendedDialog;
    3130import org.openstreetmap.josm.gui.layer.GpxLayer;
     
    173172            gpxData = ((GpxLayer) layer).data;
    174173        } else {
    175             gpxData = OsmDataLayer.toGpxData(getCurrentDataSet(), file);
     174            gpxData = OsmDataLayer.toGpxData(Main.main.getCurrentDataSet(), file);
    176175        }
    177176
     
    337336        authorNameListener.keyReleased(null);
    338337    }
    339 
    340     /**
    341      * Replies the current dataset
    342      *
    343      * @return the current dataset. null, if no current dataset exists
    344      */
    345     private DataSet getCurrentDataSet() {
    346         return Main.main.getCurrentDataSet();
    347     }
    348338}
  • trunk/src/org/openstreetmap/josm/io/InvalidXmlCharacterFilter.java

    r8387 r8870  
    6161    }
    6262
    63     private char filter(char in) {
     63    private static char filter(char in) {
    6464        if (in < 0x20 && INVALID_CHARS[in]) {
    6565            if (firstWarning) {
  • trunk/src/org/openstreetmap/josm/io/JpgImporter.java

    r8846 r8870  
    8888    }
    8989
    90     private void addRecursiveFiles(List<File> files, Set<String> visitedDirs, List<File> sel, ProgressMonitor progressMonitor)
     90    private static void addRecursiveFiles(List<File> files, Set<String> visitedDirs, List<File> sel, ProgressMonitor progressMonitor)
    9191            throws IOException {
    9292
  • trunk/src/org/openstreetmap/josm/io/NmeaReader.java

    r8840 r8870  
    448448    }
    449449
    450     private LatLon parseLatLon(String ns, String ew, String dlat, String dlon)
     450    private static LatLon parseLatLon(String ns, String ew, String dlat, String dlon)
    451451    throws NumberFormatException {
    452452        String widthNorth = dlat.trim();
  • trunk/src/org/openstreetmap/josm/io/OsmServerReader.java

    r8846 r8870  
    210210    }
    211211
    212     private InputStream fixEncoding(InputStream stream, String encoding) throws IOException {
     212    private static InputStream fixEncoding(InputStream stream, String encoding) throws IOException {
    213213        if ("gzip".equalsIgnoreCase(encoding)) {
    214214            stream = new GZIPInputStream(stream);
  • trunk/src/org/openstreetmap/josm/io/OverpassDownloadReader.java

    r8854 r8870  
    5454    }
    5555
    56     private String completeOverpassQuery(String query) {
     56    private static String completeOverpassQuery(String query) {
    5757        int firstColon = query.indexOf(';');
    5858        if (firstColon == -1) {
  • trunk/src/org/openstreetmap/josm/io/imagery/WMSImagery.java

    r8846 r8870  
    303303    }
    304304
    305     private boolean isProjSupported(String crs) {
     305    private static boolean isProjSupported(String crs) {
    306306        for (ProjectionChoice pc : ProjectionPreference.getProjectionChoices()) {
    307307            if (pc.getPreferencesFromCode(crs) != null) return true;
  • trunk/src/org/openstreetmap/josm/io/remotecontrol/RequestProcessor.java

    r8846 r8870  
    354354     *             When error
    355355     */
    356     private void sendHeader(Writer out, String status, String contentType,
     356    private static void sendHeader(Writer out, String status, String contentType,
    357357            boolean endHeaders) throws IOException {
    358358        out.write("HTTP/1.1 " + status + "\r\n");
  • trunk/src/org/openstreetmap/josm/io/session/GeoImageSessionExporter.java

    r8510 r8870  
    124124    }
    125125
    126     private void addAttr(String name, String value, Element element, SessionWriter.ExportSupport support) {
    127             Element attrElem = support.createElement(name);
    128             attrElem.appendChild(support.createTextNode(value));
    129             element.appendChild(attrElem);
     126    private static void addAttr(String name, String value, Element element, SessionWriter.ExportSupport support) {
     127        Element attrElem = support.createElement(name);
     128        attrElem.appendChild(support.createTextNode(value));
     129        element.appendChild(attrElem);
    130130    }
    131131}
Note: See TracChangeset for help on using the changeset viewer.