Changeset 14095 in josm


Ignore:
Timestamp:
2018-08-05T21:58:40+02:00 (8 months ago)
Author:
Don-vip
Message:

fix error_prone warnings

Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/build.xml

    r14093 r14095  
    346346            <!-- Undocumented argument to ignore "Sun internal proprietary API" warning, see http://stackoverflow.com/a/13862308/2257172 -->
    347347            <compilerarg value="-XDignore.symbol.file"/>
     348            <compilerarg value="-Xep:CatchAndPrintStackTrace:OFF" compiler="com.google.errorprone.ErrorProneAntCompilerAdapter"/>
    348349            <compilerarg value="-Xep:ReferenceEquality:OFF" compiler="com.google.errorprone.ErrorProneAntCompilerAdapter"/>
    349350            <compilerarg value="-Xep:StringSplitter:OFF" compiler="com.google.errorprone.ErrorProneAntCompilerAdapter"/>
  • trunk/src/org/openstreetmap/josm/data/Bounds.java

    r13602 r14095  
    160160    /**
    161161     * Constructs bounds out of two points. Coords will be rounded.
    162      * @param minlat min lat
    163      * @param minlon min lon
    164      * @param maxlat max lat
    165      * @param maxlon max lon
    166      */
    167     public Bounds(double minlat, double minlon, double maxlat, double maxlon) {
    168         this(minlat, minlon, maxlat, maxlon, true);
     162     * @param minLat min lat
     163     * @param minLon min lon
     164     * @param maxLat max lat
     165     * @param maxLon max lon
     166     */
     167    public Bounds(double minLat, double minLon, double maxLat, double maxLon) {
     168        this(minLat, minLon, maxLat, maxLon, true);
    169169    }
    170170
    171171    /**
    172172     * Constructs bounds out of two points.
    173      * @param minlat min lat
    174      * @param minlon min lon
    175      * @param maxlat max lat
    176      * @param maxlon max lon
     173     * @param minLat min lat
     174     * @param minLon min lon
     175     * @param maxLat max lat
     176     * @param maxLon max lon
    177177     * @param roundToOsmPrecision defines if lat/lon will be rounded
    178178     */
    179     public Bounds(double minlat, double minlon, double maxlat, double maxlon, boolean roundToOsmPrecision) {
     179    public Bounds(double minLat, double minLon, double maxLat, double maxLon, boolean roundToOsmPrecision) {
    180180        if (roundToOsmPrecision) {
    181             this.minLat = LatLon.roundToOsmPrecision(minlat);
    182             this.minLon = LatLon.roundToOsmPrecision(minlon);
    183             this.maxLat = LatLon.roundToOsmPrecision(maxlat);
    184             this.maxLon = LatLon.roundToOsmPrecision(maxlon);
    185         } else {
    186             this.minLat = minlat;
    187             this.minLon = minlon;
    188             this.maxLat = maxlat;
    189             this.maxLon = maxlon;
     181            this.minLat = LatLon.roundToOsmPrecision(minLat);
     182            this.minLon = LatLon.roundToOsmPrecision(minLon);
     183            this.maxLat = LatLon.roundToOsmPrecision(maxLat);
     184            this.maxLon = LatLon.roundToOsmPrecision(maxLon);
     185        } else {
     186            this.minLat = minLat;
     187            this.minLon = minLon;
     188            this.maxLat = maxLat;
     189            this.maxLon = maxLon;
    190190        }
    191191    }
  • trunk/src/org/openstreetmap/josm/data/UserIdentityManager.java

    r13493 r14095  
    241241     * Replies true if the user with name <code>username</code> is the current user
    242242     *
    243      * @param username the user name
     243     * @param userName the user name
    244244     * @return true if the user with name <code>username</code> is the current user
    245245     */
    246     public boolean isCurrentUser(String username) {
    247         return this.userName != null && this.userName.equals(username);
     246    public boolean isCurrentUser(String userName) {
     247        return this.userName != null && this.userName.equals(userName);
    248248    }
    249249
  • trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/LineElement.java

    r13919 r14095  
    9292        public final float defaultMajorZIndex;
    9393
    94         LineType(String prefix, float defaultMajorZindex) {
     94        LineType(String prefix, float defaultMajorZIndex) {
    9595            this.prefix = prefix;
    96             this.defaultMajorZIndex = defaultMajorZindex;
     96            this.defaultMajorZIndex = defaultMajorZIndex;
    9797        }
    9898    }
  • trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/StyleElement.java

    r13662 r14095  
    5858    /**
    5959     * Construct a new StyleElement
    60      * @param majorZindex like z-index, but higher priority
     60     * @param majorZIndex like z-index, but higher priority
    6161     * @param zIndex order the objects are drawn
    62      * @param objectZindex like z-index, but lower priority
     62     * @param objectZIndex like z-index, but lower priority
    6363     * @param isModifier if false, a default line or node symbol is generated
    6464     * @param defaultSelectedHandling true if default behavior for selected objects
    6565     * is enabled, false if a style for selected state is given explicitly
    6666     */
    67     public StyleElement(float majorZindex, float zIndex, float objectZindex, boolean isModifier, boolean defaultSelectedHandling) {
    68         this.majorZIndex = majorZindex;
     67    public StyleElement(float majorZIndex, float zIndex, float objectZIndex, boolean isModifier, boolean defaultSelectedHandling) {
     68        this.majorZIndex = majorZIndex;
    6969        this.zIndex = zIndex;
    70         this.objectZIndex = objectZindex;
     70        this.objectZIndex = objectZIndex;
    7171        this.isModifier = isModifier;
    7272        this.defaultSelectedHandling = defaultSelectedHandling;
  • trunk/src/org/openstreetmap/josm/io/ChangesetQuery.java

    r14040 r14095  
    107107     * {@link #forUser(int)} to restrict the query to a specific user.
    108108     *
    109      * @param username the username. Must not be null.
     109     * @param userName the username. Must not be null.
    110110     * @return the query object with the applied restriction
    111111     * @throws IllegalArgumentException if username is null.
    112112     * @see #forUser(int)
    113113     */
    114     public ChangesetQuery forUser(String username) {
    115         CheckParameterUtil.ensureParameterNotNull(username, "username");
    116         this.userName = username;
     114    public ChangesetQuery forUser(String userName) {
     115        CheckParameterUtil.ensureParameterNotNull(userName, "userName");
     116        this.userName = userName;
    117117        this.uid = null;
    118118        return this;
  • trunk/src/org/openstreetmap/josm/io/audio/AudioPlayer.java

    r13819 r14095  
    352352
    353353    @Override
    354     public void playing(URL playingURL) {
    355         this.playingUrl = playingURL;
     354    public void playing(URL playingUrl) {
     355        this.playingUrl = playingUrl;
    356356    }
    357357}
  • trunk/src/org/openstreetmap/josm/tools/bugreport/ReportedException.java

    r13647 r14095  
    7272            BugReportQueue.getInstance().submit(this);
    7373        } catch (RuntimeException e) { // NOPMD
    74             e.printStackTrace();
     74            Logging.error(e);
    7575        }
    7676    }
Note: See TracChangeset for help on using the changeset viewer.