Changeset 19388 in josm


Ignore:
Timestamp:
2025-04-23T20:03:54+02:00 (11 days ago)
Author:
stoecker
Message:

see #24238 - fix PMD issues

Location:
trunk/src/org/openstreetmap/josm
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/gpx/GpxImageCorrelation.java

    r19387 r19388  
    66import java.util.Collection;
    77import java.util.List;
     8import java.util.Locale;
    89import java.util.concurrent.TimeUnit;
    910
     
    238239                    return pdopvalue.doubleValue();
    239240                } else if (wp.attr.get(GpxConstants.PT_PDOP) instanceof Double) {
    240                     Double pdopvalue = (Double) wp.attr.get(GpxConstants.PT_PDOP);
    241                     return pdopvalue.doubleValue();
     241                    return (Double) wp.attr.get(GpxConstants.PT_PDOP);
    242242                }
    243243            } else if (wp.attr.get(GpxConstants.PT_HDOP) != null) {
     
    246246                    return hdopvalue.doubleValue();
    247247                } else if (wp.attr.get(GpxConstants.PT_HDOP) instanceof Double) {
    248                     Double hdopvalue = (Double) wp.attr.get(GpxConstants.PT_HDOP);
    249                     return hdopvalue.doubleValue();
     248                    return (Double) wp.attr.get(GpxConstants.PT_HDOP);
    250249                }
    251250            }
     
    279278                return null;
    280279            }
    281             gpsProcMethod = "GNSS" + " " + positioningModes.get(lowestProcIndex).toUpperCase() + " " + "CORRELATION";
     280            gpsProcMethod = "GNSS" + " " + positioningModes.get(lowestProcIndex).toUpperCase(Locale.ENGLISH) + " " + "CORRELATION";
    282281            if (lowestProcIndex < lowestGnssModeIdx) {
    283                 gpsProcMethod = positioningModes.get(lowestProcIndex).toUpperCase() + " " + "CORRELATION";
     282                gpsProcMethod = positioningModes.get(lowestProcIndex).toUpperCase(Locale.ENGLISH) + " " + "CORRELATION";
    284283            } else {
    285                 gpsProcMethod = "GNSS" + " " + positioningModes.get(lowestProcIndex).toUpperCase() + " " + "CORRELATION";
     284                gpsProcMethod = "GNSS" + " " + positioningModes.get(lowestProcIndex).toUpperCase(Locale.ENGLISH) + " " + "CORRELATION";
    286285            }
    287286            gpsProcMethod = gpsProcMethod.replace("FLOAT RTK", "RTK_FLOAT");
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java

    r19387 r19388  
    482482
    483483    static String loadGpsDatum() {
    484         String gpsDatum = Config.getPref().get("geoimage.datum", "WGS-84");
    485         return gpsDatum;
     484        return Config.getPref().get("geoimage.datum", "WGS-84");
    486485    }
    487486
  • trunk/src/org/openstreetmap/josm/tools/ExifReader.java

    r19387 r19388  
    150150        if (dirGps != null) {
    151151            try {
    152                 Instant dateTimeStamp = dirGps.getGpsDate().toInstant();
    153                 return dateTimeStamp;
     152                return dirGps.getGpsDate().toInstant();
    154153            } catch (UncheckedParseException | DateTimeException e) {
    155154                Logging.error(e);
     
    422421        if (dirGps != null) {
    423422            Double hposerr = dirGps.getDoubleObject(GpsDirectory.TAG_H_POSITIONING_ERROR);
    424             if (hposerr != null) {
    425                 return hposerr.doubleValue();
    426             }
     423            if (hposerr != null)
     424                return hposerr;
    427425        }
    428426        return null;
     
    465463        if (dirGps != null) {
    466464            Integer gpsDiffMode = dirGps.getInteger(GpsDirectory.TAG_DIFFERENTIAL);
    467             if (gpsDiffMode != null) {
    468                 return gpsDiffMode.intValue();
    469             }
     465            if (gpsDiffMode != null)
     466                return gpsDiffMode;
    470467        }
    471468        return null;
     
    508505        if (dirGps != null) {
    509506            Integer gps2d3dMode = dirGps.getInteger(GpsDirectory.TAG_MEASURE_MODE);
    510             if (gps2d3dMode != null) {
    511                 return gps2d3dMode.intValue();
    512             }
     507            if (gps2d3dMode != null)
     508                return gps2d3dMode;
    513509        }
    514510        return null;
     
    544540            Double gpsDop = dirGps.getDoubleObject(GpsDirectory.TAG_DOP);
    545541            if (gpsDop != null) {
    546                 return gpsDop.doubleValue();
     542                return gpsDop;
    547543            }
    548544        }
     
    578574        if (dirGps != null) {
    579575            String gpsDatum = dirGps.getString(GpsDirectory.TAG_MAP_DATUM);
    580             if (gpsDatum != null) {
    581                 return gpsDatum.toString();
    582             }
     576            if (gpsDatum != null)
     577                return gpsDatum;
    583578        }
    584579        return null;
     
    637632        if (dirGps != null) {
    638633            String gpsProcessingMethod = dirGps.getDescription(GpsDirectory.TAG_PROCESSING_METHOD);
    639             if (gpsProcessingMethod != null) {
    640                 return gpsProcessingMethod.toString();
    641             }
     634            if (gpsProcessingMethod != null)
     635                return gpsProcessingMethod;
    642636        }
    643637        return null;
Note: See TracChangeset for help on using the changeset viewer.