Changeset 14091 in josm for trunk/src


Ignore:
Timestamp:
2018-08-05T20:11:27+02:00 (6 years ago)
Author:
Don-vip
Message:

tools update: awaitility 3.1.2, equalsverifier 2.5.1, jmockit 1.41, reflections 0.9.11, error_prone 2.3.1, proguard 6.0.3, pmd 6.6.0, spotbugs 3.1.6

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

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/coor/LatLon.java

    r13966 r14091  
    234234        // rounding errors could make the argument of asin greater than 1
    235235        // (This should almost never happen.)
    236         if (java.lang.Double.isNaN(d)) {
     236        if (Double.isNaN(d)) {
    237237            Logging.error("NaN in greatCircleDistance");
    238238            d = PI * WGS84.a;
  • trunk/src/org/openstreetmap/josm/data/projection/proj/AzimuthalEquidistant.java

    r13601 r14091  
    214214        double lambda = 0;
    215215        double phi = 0;
    216         double c_rh = Math.hypot(x, y);
    217         if (c_rh > Math.PI) {
    218             if (c_rh - EPS10 > Math.PI) {
     216        double cRh = Math.hypot(x, y);
     217        if (cRh > Math.PI) {
     218            if (cRh - EPS10 > Math.PI) {
    219219                throw new JosmRuntimeException("TOLERANCE_ERROR");
    220220            }
    221         } else if (c_rh < EPS10) {
     221        } else if (cRh < EPS10) {
    222222            phi = latitudeOfOrigin;
    223223            lambda = 0.;
    224224        } else {
    225225            if (mode == Mode.OBLIQUE || mode == Mode.EQUATORIAL) {
    226                 double sinc = Math.sin(c_rh);
    227                 double cosc = Math.cos(c_rh);
     226                double sinc = Math.sin(cRh);
     227                double cosc = Math.cos(cRh);
    228228                if (mode == Mode.EQUATORIAL) {
    229                     phi = aasin(y * sinc / c_rh);
     229                    phi = aasin(y * sinc / cRh);
    230230                    x *= sinc;
    231                     y = cosc * c_rh;
     231                    y = cosc * cRh;
    232232                } else { // Oblique
    233                     phi = aasin(cosc * sinph0 + y * sinc * cosph0 / c_rh);
    234                     y = (cosc - sinph0 * Math.sin(phi)) * c_rh;
     233                    phi = aasin(cosc * sinph0 + y * sinc * cosph0 / cRh);
     234                    y = (cosc - sinph0 * Math.sin(phi)) * cRh;
    235235                    x *= sinc * cosph0;
    236236                }
    237237                lambda = (y == 0) ? 0 : Math.atan2(x, y);
    238238            } else if (mode == Mode.NORTH_POLAR) {
    239                 phi = HALF_PI - c_rh;
     239                phi = HALF_PI - cRh;
    240240                lambda = Math.atan2(x, -y);
    241241            } else { // South Polar
    242                 phi = c_rh - HALF_PI;
     242                phi = cRh - HALF_PI;
    243243                lambda = Math.atan2(x, y);
    244244            }
  • trunk/src/org/openstreetmap/josm/tools/WindowsShortcut.java

    r13698 r14091  
    4444     */
    4545    public static boolean isPotentialValidLink(File file) throws IOException {
    46         final int minimum_length = 0x64;
     46        final int minimumLength = 0x64;
    4747        boolean isPotentiallyValid = false;
    4848        try (InputStream fis = Files.newInputStream(file.toPath())) {
    4949            isPotentiallyValid = file.isFile()
    5050                && file.getName().toLowerCase(Locale.ENGLISH).endsWith(".lnk")
    51                 && fis.available() >= minimum_length
     51                && fis.available() >= minimumLength
    5252                && isMagicPresent(getBytes(fis, 32));
    5353        }
     
    126126    private static boolean isMagicPresent(byte[] link) {
    127127        final int magic = 0x0000004C;
    128         final int magic_offset = 0x00;
    129         return link.length >= 32 && bytesToDword(link, magic_offset) == magic;
     128        final int magicOffset = 0x00;
     129        return link.length >= 32 && bytesToDword(link, magicOffset) == magic;
    130130    }
    131131
Note: See TracChangeset for help on using the changeset viewer.