Changeset 16627 in josm


Ignore:
Timestamp:
2020-06-14T14:55:26+02:00 (8 weeks ago)
Author:
simon04
Message:

see #19334 - https://errorprone.info/bugpattern/FloatingPointLiteralPrecision

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/build.xml

    r16626 r16627  
    302302            <!-- Undocumented argument to ignore "Sun internal proprietary API" warning, see http://stackoverflow.com/a/13862308/2257172 -->
    303303            <compilerarg value="-XDignore.symbol.file"/>
    304             <compilerarg value="-Xplugin:ErrorProne -XepExcludedPaths:.*/parsergen/.* -Xep:ReferenceEquality:OFF -Xep:FutureReturnValueIgnored:OFF -Xep:FloatingPointLiteralPrecision:OFF -Xep:ShortCircuitBoolean:OFF -Xep:StringSplitter:OFF -Xep:JdkObsolete:OFF -Xep:UnnecessaryParentheses:OFF -Xep:EqualsGetClass:OFF -Xep:UndefinedEquals:OFF -Xep:MixedMutabilityReturnType:OFF -Xep:JavaTimeDefaultTimeZone:OFF -Xep:BadImport:OFF -Xep:AnnotateFormatMethod:OFF -Xep:MutablePublicArray:OFF"/>
     304            <compilerarg value="-Xplugin:ErrorProne -XepExcludedPaths:.*/parsergen/.* -Xep:ReferenceEquality:OFF -Xep:FutureReturnValueIgnored:OFF -Xep:ShortCircuitBoolean:OFF -Xep:StringSplitter:OFF -Xep:JdkObsolete:OFF -Xep:UnnecessaryParentheses:OFF -Xep:EqualsGetClass:OFF -Xep:UndefinedEquals:OFF -Xep:MixedMutabilityReturnType:OFF -Xep:JavaTimeDefaultTimeZone:OFF -Xep:BadImport:OFF -Xep:AnnotateFormatMethod:OFF -Xep:MutablePublicArray:OFF"/>
    305305            <compilerarg line="-Xmaxwarns 1000"/>
    306306            <classpath>
  • trunk/src/org/openstreetmap/josm/data/imagery/AbstractWMSTileSource.java

    r16553 r16627  
    3636    private int[] tileYMax;
    3737    private double[] degreesPerTile;
    38     private static final float SCALE_DENOMINATOR_ZOOM_LEVEL_1 = 559082264.0287178f;
     38    private static final double SCALE_DENOMINATOR_ZOOM_LEVEL_1 = 5.59082264028718e08;
    3939    private Projection tileProjection;
    4040
     
    9292
    9393        for (int zoom = 1; zoom <= getMaxZoom(); zoom++) {
    94             // use well known scale set "GoogleCompatibile" from OGC WMTS spec to calculate number of tiles per zoom level
     94            // use well known scale set "GoogleCompatible" from OGC WMTS spec to calculate number of tiles per zoom level
    9595            // this makes the zoom levels "glued" to standard TMS zoom levels
    9696            degreesPerTile[zoom] = (SCALE_DENOMINATOR_ZOOM_LEVEL_1 / Math.pow(2d, zoom - 1d)) * crsScale;
  • trunk/src/org/openstreetmap/josm/data/projection/proj/AbstractProj.java

    r14273 r16627  
    4242    private static final double C00 = 1.0;
    4343    private static final double C02 = 0.25;
    44     private static final double C04 = 0.046875;
    45     private static final double C06 = 0.01953125;
    46     private static final double C08 = 0.01068115234375;
     44    private static final double C04 = 4.6875E-02;
     45    private static final double C06 = 1.953125E-02;
     46    private static final double C08 = 1.068115234375E-02;
    4747    private static final double C22 = 0.75;
    48     private static final double C44 = 0.46875;
    49     private static final double C46 = 0.01302083333333333333;
    50     private static final double C48 = 0.00712076822916666666;
    51     private static final double C66 = 0.36458333333333333333;
    52     private static final double C68 = 0.00569661458333333333;
    53     private static final double C88 = 0.3076171875;
     48    private static final double C44 = 4.6875E-01;
     49    private static final double C46 = 1.30208333333333E-02;
     50    private static final double C48 = 7.12076822916667E-03;
     51    private static final double C66 = 3.64583333333333E-01;
     52    private static final double C68 = 5.69661458333333E-03;
     53    private static final double C88 = 3.076171875E-01;
    5454
    5555    /**
  • trunk/src/org/openstreetmap/josm/data/projection/proj/CassiniSoldner.java

    r13632 r16627  
    4141     * case of the Cassini-Soldner.
    4242     */
    43     private static final double C1 = 0.16666666666666666666;
    44     private static final double C2 = 0.008333333333333333333;
    45     private static final double C3 = 0.041666666666666666666;
    46     private static final double C4 = 0.33333333333333333333;
    47     private static final double C5 = 0.066666666666666666666;
     43    private static final double C1 = 1. / 6;
     44    private static final double C2 = 1. / 120;
     45    private static final double C3 = 1. / 24;
     46    private static final double C4 = 1. / 3;
     47    private static final double C5 = 1. / 15;
    4848
    4949    @Override
  • trunk/src/org/openstreetmap/josm/data/projection/proj/LambertAzimuthalEqualArea.java

    r12013 r16627  
    4141
    4242    /** Constants for authalic latitude. */
    43     private static final double P00 = 0.33333333333333333333;
    44     private static final double P01 = 0.17222222222222222222;
    45     private static final double P02 = 0.10257936507936507936;
    46     private static final double P10 = 0.06388888888888888888;
    47     private static final double P11 = 0.06640211640211640211;
    48     private static final double P20 = 0.01641501294219154443;
     43    private static final double P00 = 3.33333333333333E-01;
     44    private static final double P01 = 1.72222222222222E-01;
     45    private static final double P02 = 1.02579365079365E-01;
     46    private static final double P10 = 6.38888888888889E-02;
     47    private static final double P11 = 6.64021164021164E-02;
     48    private static final double P20 = 1.64150129421915E-02;
    4949
    5050    /** The projection mode. */
  • trunk/src/org/openstreetmap/josm/data/projection/proj/TransverseMercator.java

    r14273 r16627  
    8585     * case of the Transverse Mercator.
    8686     */
    87     private static final double FC1 = 1.00000000000000000000000,  // 1/1
    88                                 FC2 = 0.50000000000000000000000,  // 1/2
    89                                 FC3 = 0.16666666666666666666666,  // 1/6
    90                                 FC4 = 0.08333333333333333333333,  // 1/12
    91                                 FC5 = 0.05000000000000000000000,  // 1/20
    92                                 FC6 = 0.03333333333333333333333,  // 1/30
    93                                 FC7 = 0.02380952380952380952380,  // 1/42
    94                                 FC8 = 0.01785714285714285714285;  // 1/56
     87    private static final double FC1 = 1. / 1;
     88    private static final double FC2 = 1. / 2;
     89    private static final double FC3 = 1. / 6;
     90    private static final double FC4 = 1. / 12;
     91    private static final double FC5 = 1. / 20;
     92    private static final double FC6 = 1. / 30;
     93    private static final double FC7 = 1. / 42;
     94    private static final double FC8 = 1. / 56;
    9595
    9696    /**
Note: See TracChangeset for help on using the changeset viewer.