Changeset 8419 in josm


Ignore:
Timestamp:
2015-05-23T01:40:23+02:00 (9 years ago)
Author:
Don-vip
Message:

Sonar: various code style cleanup:

  • fix copyright
  • classes that should be final
  • order of javadoc At-clauses
  • unexpected spaces before parenthesis
Location:
trunk/src/org/openstreetmap/josm
Files:
63 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/AlignInCircleAction.java

    r8393 r8419  
    3232 * Aligns all selected nodes within a circle. (Useful for roundabouts)
    3333 *
    34  * @since 146
    35  *
    3634 * @author Matthew Newton
    3735 * @author Petr Dlouhý
    3836 * @author Teemu Koskinen
    3937 * @author Alain Delplanque
     38 *
     39 * @since 146
    4040 */
    4141public final class AlignInCircleAction extends JosmAction {
  • trunk/src/org/openstreetmap/josm/actions/CloseChangesetAction.java

    r8377 r8419  
    7676    }
    7777
    78     private class DownloadOpenChangesetsTask extends PleaseWaitRunnable {
     78    private final class DownloadOpenChangesetsTask extends PleaseWaitRunnable {
    7979
    8080        private boolean canceled;
  • trunk/src/org/openstreetmap/josm/actions/CreateCircleAction.java

    r8308 r8419  
    4545 * BTW: Someone might want to implement projection corrections for this...
    4646 *
    47  * @since 996
    48  *
    4947 * @author Henry Loenwind
    5048 * @author Sebastian Masch
    5149 * @author Alain Delplanque
     50 *
     51 * @since 996
    5252 */
    5353public final class CreateCircleAction extends JosmAction {
  • trunk/src/org/openstreetmap/josm/actions/CreateMultipolygonAction.java

    r8406 r8419  
    8383    }
    8484
    85     private static class CreateUpdateMultipolygonTask implements Runnable {
     85    private static final class CreateUpdateMultipolygonTask implements Runnable {
    8686        private final Collection<Way> selectedWays;
    8787        private final Relation multipolygonRelation;
  • trunk/src/org/openstreetmap/josm/actions/DownloadNotesInViewAction.java

    r8212 r8419  
    1818 * No interaction is required.
    1919 */
    20 public class DownloadNotesInViewAction extends JosmAction {
     20public final class DownloadNotesInViewAction extends JosmAction {
    2121
    2222    private DownloadNotesInViewAction(String iconName) {
  • trunk/src/org/openstreetmap/josm/actions/SaveActionBase.java

    r8378 r8419  
    134134     * @param filter The dialog file filter
    135135     * @return The output {@code File}
     136     * @see DiskAccessAction#createAndOpenFileChooser(boolean, boolean, String, FileFilter, int, String)
    136137     * @since 5456
    137      * @see DiskAccessAction#createAndOpenFileChooser(boolean, boolean, String, FileFilter, int, String)
    138138     */
    139139    public static File createAndOpenSaveFileChooser(String title, ExtensionFileFilter filter) {
  • trunk/src/org/openstreetmap/josm/actions/UploadNotesAction.java

    r8318 r8419  
    2323
    2424    /** Create a new action to upload notes */
    25     public UploadNotesAction () {
     25    public UploadNotesAction() {
    2626        putValue(SHORT_DESCRIPTION,tr("Upload note changes to server"));
    2727        putValue(NAME, tr("Upload notes"));
  • trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmChangeTask.java

    r8332 r8419  
    125125     * Loads history and updates incomplete primitives.
    126126     */
    127     private static class HistoryLoaderAndListener extends HistoryLoadTask implements HistoryDataSetListener {
     127    private static final class HistoryLoaderAndListener extends HistoryLoadTask implements HistoryDataSetListener {
    128128
    129129        private final Map<OsmPrimitive, Date> toLoad;
  • trunk/src/org/openstreetmap/josm/actions/mapmode/ParallelWayAction.java

    r8378 r8419  
    208208    private void updateModeLocalPreferences() {
    209209        // @formatter:off
    210         snapThreshold        = Main.pref.getDouble (prefKey("snap-threshold-percent"), 0.70);
     210        snapThreshold        = Main.pref.getDouble(prefKey("snap-threshold-percent"), 0.70);
    211211        snapDefault          = Main.pref.getBoolean(prefKey("snap-default"),      true);
    212212        copyTagsDefault      = Main.pref.getBoolean(prefKey("copy-tags-default"), true);
  • trunk/src/org/openstreetmap/josm/actions/upload/FixDataHook.java

    r8338 r8419  
    3535     * Constructor for data initialization
    3636     */
    37     public FixDataHook () {
     37    public FixDataHook() {
    3838        deprecated.add(new FixDataSpace());
    3939        deprecated.add(new FixDataKey("color",            "colour"));
  • trunk/src/org/openstreetmap/josm/data/CustomConfigurator.java

    r8404 r8419  
    10051005        Map<String, String> stringMap =  (Map<String, String>) engine.get("stringMap");
    10061006        @SuppressWarnings("unchecked")
    1007         Map<String, List<String>> listMap = (SortedMap<String, List<String>> ) engine.get("listMap");
     1007        Map<String, List<String>> listMap = (SortedMap<String, List<String>>) engine.get("listMap");
    10081008        @SuppressWarnings("unchecked")
    10091009        Map<String, List<Collection<String>>> listlistMap = (SortedMap<String, List<Collection<String>>>) engine.get("listlistMap");
  • trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java

    r8404 r8419  
    441441    /* ------*/
    442442
    443     private void updateFlagsNoLock (int flag, boolean value) {
     443    private void updateFlagsNoLock(int flag, boolean value) {
    444444        super.updateFlags(flag, value);
    445445    }
  • trunk/src/org/openstreetmap/josm/data/osm/PrimitiveId.java

    r5417 r8419  
    1919     * Gets the type of object represented by this object.
    2020     *
     21     * @return the object type
    2122     * @see Node
    2223     * @see Way
    2324     * @see Relation
    24      * @return the object type
    2525     */
    2626    OsmPrimitiveType getType();
  • trunk/src/org/openstreetmap/josm/data/osm/Tag.java

    r6699 r8419  
    102102    /**
    103103     * This constructs a {@link Tag} by splitting {@code s} on the first equality sign.
    104      * @see org.openstreetmap.josm.tools.TextTagParser
    105104     * @param s the string to convert
    106105     * @return the constructed tag
     106     * @see org.openstreetmap.josm.tools.TextTagParser
    107107     */
    108108    public static Tag ofString(String s) {
  • trunk/src/org/openstreetmap/josm/data/osm/Way.java

    r8365 r8419  
    112112     *
    113113     * @return the real number of nodes in this way.
    114      * @since 5847
    115114     *
    116115     * @see #getNodesCount()
    117116     * @see #isClosed()
     117     * @since 5847
    118118     */
    119119    public int getRealNodesCount() {
  • trunk/src/org/openstreetmap/josm/data/osm/event/DataSetListener.java

    r6380 r8419  
    55 * A listener listening for all DataSet changes.
    66 *
     7 * @author nenik
    78 * @see DataSetListenerAdapter
    8  * @author nenik
    99 */
    1010public interface DataSetListener {
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/LineClip.java

    r8342 r8419  
    6565        boolean done = false;
    6666
    67         outcode0 = computeOutCode (x1, y1, xmin, ymin, xmax, ymax);
    68         outcode1 = computeOutCode (x2, y2, xmin, ymin, xmax, ymax);
     67        outcode0 = computeOutCode(x1, y1, xmin, ymin, xmax, ymax);
     68        outcode1 = computeOutCode(x2, y2, xmin, ymin, xmax, ymax);
    6969
    7070        do {
     
    115115     * We cannot use Rectangle.outcode since it does not work with long ints.
    116116     */
    117     private static int computeOutCode (long x, long y, long xmin, long ymin, long xmax, long ymax) {
     117    private static int computeOutCode(long x, long y, long xmin, long ymin, long xmax, long ymax) {
    118118        int code = 0;
    119119        if (y > ymax) {
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java

    r8395 r8419  
    13201320                            final double sy = l * (p1.y - p2.y);
    13211321
    1322                             orientationArrows.moveTo (p2.x + cosPHI * sx - sinPHI * sy, p2.y + sinPHI * sx + cosPHI * sy);
     1322                            orientationArrows.moveTo(p2.x + cosPHI * sx - sinPHI * sy, p2.y + sinPHI * sx + cosPHI * sy);
    13231323                            orientationArrows.lineTo(p2.x, p2.y);
    1324                             orientationArrows.lineTo (p2.x + cosPHI * sx + sinPHI * sy, p2.y - sinPHI * sx + cosPHI * sy);
     1324                            orientationArrows.lineTo(p2.x + cosPHI * sx + sinPHI * sy, p2.y - sinPHI * sx + cosPHI * sy);
    13251325                        }
    13261326                    }
     
    13511351
    13521352                                    onewayPath.moveTo(x, y);
    1353                                     onewayPath.lineTo (x + cosPHI * sx - sinPHI * sy, y + sinPHI * sx + cosPHI * sy);
    1354                                     onewayPath.lineTo (x + cosPHI * sx + sinPHI * sy, y - sinPHI * sx + cosPHI * sy);
     1353                                    onewayPath.lineTo(x + cosPHI * sx - sinPHI * sy, y + sinPHI * sx + cosPHI * sy);
     1354                                    onewayPath.lineTo(x + cosPHI * sx + sinPHI * sy, y - sinPHI * sx + cosPHI * sy);
    13551355                                    onewayPath.lineTo(x, y);
    13561356                                }
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/WireframeMapRenderer.java

    r8395 r8419  
    432432                final double sy = l * (p1.y - p2.y);
    433433
    434                 path.lineTo (p2.x + (int) Math.round(cosPHI * sx - sinPHI * sy), p2.y + (int) Math.round(sinPHI * sx + cosPHI * sy));
    435                 path.moveTo (p2.x + (int) Math.round(cosPHI * sx + sinPHI * sy), p2.y + (int) Math.round(- sinPHI * sx + cosPHI * sy));
     434                path.lineTo(p2.x + (int) Math.round(cosPHI * sx - sinPHI * sy), p2.y + (int) Math.round(sinPHI * sx + cosPHI * sy));
     435                path.moveTo(p2.x + (int) Math.round(cosPHI * sx + sinPHI * sy), p2.y + (int) Math.round(- sinPHI * sx + cosPHI * sy));
    436436                path.lineTo(p2.x, p2.y);
    437437            }
  • trunk/src/org/openstreetmap/josm/data/projection/proj/TransverseMercator.java

    r8345 r8419  
    9595                + (N_a / 5040.0 * pow(cos(phi), 7.0) * l7coef * pow(l, 7.0)),
    9696                /* Calculate northing (y) */
    97                 ArcLengthOfMeridian (phi) / a
     97                ArcLengthOfMeridian(phi) / a
    9898                + (t / 2.0 * N_a * pow(cos(phi), 2.0) * pow(l, 2.0))
    9999                + (t / 24.0 * N_a * pow(cos(phi), 4.0) * l4coef * pow(l, 4.0))
  • trunk/src/org/openstreetmap/josm/data/validation/routines/DomainValidator.java

    r8404 r8419  
    6262 * @since Validator 1.4
    6363 */
    64 public class DomainValidator extends AbstractValidator {
     64public final class DomainValidator extends AbstractValidator {
    6565
    6666    // Regular expression strings for hostnames (derived from RFC2396 and RFC 1123)
  • trunk/src/org/openstreetmap/josm/data/validation/tests/Addresses.java

    r8404 r8419  
    1 // License: GPL. See LICENSE file for details.
     1// License: GPL. For details, see LICENSE file.
    22package org.openstreetmap.josm.data.validation.tests;
    33
  • trunk/src/org/openstreetmap/josm/gui/FileDrop.java

    r8342 r8419  
    167167
    168168                        // Is it a file list?
    169                         if (tr.isDataFlavorSupported (DataFlavor.javaFileListFlavor)) {
     169                        if (tr.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) {
    170170
    171171                            // Say we'll take it.
    172                             evt.acceptDrop ( DnDConstants.ACTION_COPY );
    173                             Main.trace("FileDrop: file list accepted." );
     172                            evt.acceptDrop(DnDConstants.ACTION_COPY);
     173                            Main.trace("FileDrop: file list accepted.");
    174174
    175175                            // Get a useful list
     
    181181                            // Alert listener to drop.
    182182                            if( listener != null ) {
    183                                 listener.filesDropped( files );
     183                                listener.filesDropped(files);
    184184                            }
    185185
    186186                            // Mark that drop is completed.
    187187                            evt.getDropTargetContext().dropComplete(true);
    188                             Main.trace("FileDrop: drop complete." );
     188                            Main.trace("FileDrop: drop complete.");
    189189                        } else {
    190190                            // this section will check for a reader flavor.
     
    554554         * <tt>application/x-net.iharder.dnd.TransferableObject</tt>.
    555555         *
    556          * @see Fetcher
    557556         * @param dataClass The {@link java.lang.Class} to use in the custom data flavor
    558557         * @param fetcher The {@link Fetcher} that will return the data object
     558         * @see Fetcher
    559559         */
    560560        public TransferableObject(Class<?> dataClass, Fetcher fetcher ) {
  • trunk/src/org/openstreetmap/josm/gui/MainMenu.java

    r8404 r8419  
    441441
    442442    /**
     443     * @return the default position of tnew top-level menus
    443444     * @since 6088
    444      * @return the default position of tnew top-level menus
    445445     */
    446446    public int getDefaultMenuPos() {
  • trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java

    r8413 r8419  
    724724     * It solely depends on the distance to point p.
    725725     *
     726     * @param p the point for which to search the nearest segment.
     727     * @param ignore a collection of nodes which are not to be returned.
     728     * @param predicate the returned objects have to fulfill certain properties.
     729     *
    726730     * @return All nodes nearest to point p that are in a belt from
    727731     *      dist(nearest) to dist(nearest)+4px around p and
    728732     *      that are not in ignore.
    729      *
    730      * @param p the point for which to search the nearest segment.
    731      * @param ignore a collection of nodes which are not to be returned.
    732      * @param predicate the returned objects have to fulfill certain properties.
    733733     */
    734734    public final List<Node> getNearestNodes(Point p,
     
    771771     * It solely depends on the distance to point p.
    772772     *
     773     * @param p the point for which to search the nearest segment.
     774     * @param predicate the returned objects have to fulfill certain properties.
     775     *
    773776     * @return All nodes nearest to point p that are in a belt from
    774777     *      dist(nearest) to dist(nearest)+4px around p.
    775778     * @see #getNearestNodes(Point, Collection, Predicate)
    776      *
    777      * @param p the point for which to search the nearest segment.
    778      * @param predicate the returned objects have to fulfill certain properties.
    779779     */
    780780    public final List<Node> getNearestNodes(Point p, Predicate<OsmPrimitive> predicate) {
     
    795795     *
    796796     * Finally, if a node is not found at all, null is returned.
    797      *
    798      * @return A node within snap-distance to point p,
    799      *      that is chosen by the algorithm described.
    800797     *
    801798     * @param p the screen point
    802799     * @param predicate this parameter imposes a condition on the returned object, e.g.
    803800     *        give the nearest node that is tagged.
     801     *
     802     * @return A node within snap-distance to point p,
     803     *      that is chosen by the algorithm described.
    804804     */
    805805    public final Node getNearestNode(Point p, Predicate<OsmPrimitive> predicate, boolean useSelected) {
     
    965965     * then, within groups of equally distant segments, prefer those that are selected.
    966966     *
    967      * @return all segments within 10px of p that are not in ignore,
    968      *          sorted by their perpendicular distance.
    969      *
    970967     * @param p the point for which to search the nearest segments.
    971968     * @param ignore a collection of segments which are not to be returned.
    972969     * @param predicate the returned objects have to fulfill certain properties.
     970     *
     971     * @return all segments within 10px of p that are not in ignore,
     972     *          sorted by their perpendicular distance.
    973973     */
    974974    public final List<WaySegment> getNearestWaySegments(Point p,
     
    996996     * The result *order* depends on the current map selection state.
    997997     *
     998     * @param p the point for which to search the nearest segments.
     999     * @param predicate the returned objects have to fulfill certain properties.
     1000     *
    9981001     * @return all segments within 10px of p, sorted by their perpendicular distance.
    9991002     * @see #getNearestWaySegments(Point, Collection, Predicate)
    1000      *
    1001      * @param p the point for which to search the nearest segments.
    1002      * @param predicate the returned objects have to fulfill certain properties.
    10031003     */
    10041004    public final List<WaySegment> getNearestWaySegments(Point p, Predicate<OsmPrimitive> predicate) {
     
    11061106     * It solely depends on the perpendicular distance to point p.
    11071107     *
    1108      * @return all nearest ways to the screen point given that are not in ignore.
    1109      * @see #getNearestWaySegments(Point, Collection, Predicate)
    1110      *
    11111108     * @param p the point for which to search the nearest ways.
    11121109     * @param ignore a collection of ways which are not to be returned.
    11131110     * @param predicate the returned object has to fulfill certain properties.
     1111     *
     1112     * @return all nearest ways to the screen point given that are not in ignore.
     1113     * @see #getNearestWaySegments(Point, Collection, Predicate)
    11141114     */
    11151115    public final List<Way> getNearestWays(Point p,
     
    11371137     * It solely depends on the perpendicular distance to point p.
    11381138     *
     1139     * @param p the point for which to search the nearest ways.
     1140     * @param predicate the returned object has to fulfill certain properties.
     1141     *
    11391142     * @return all nearest ways to the screen point given.
    11401143     * @see #getNearestWays(Point, Collection, Predicate)
    1141      *
    1142      * @param p the point for which to search the nearest ways.
    1143      * @param predicate the returned object has to fulfill certain properties.
    11441144     */
    11451145    public final List<Way> getNearestWays(Point p, Predicate<OsmPrimitive> predicate) {
     
    11751175     * If nothing is found, return an empty collection.
    11761176     *
     1177     * @param p The point on screen.
     1178     * @param ignore a collection of ways which are not to be returned.
     1179     * @param predicate the returned object has to fulfill certain properties.
     1180     *
    11771181     * @return Primitives nearest to the given screen point that are not in ignore.
    11781182     * @see #getNearestNodes(Point, Collection, Predicate)
    11791183     * @see #getNearestWays(Point, Collection, Predicate)
    1180      *
    1181      * @param p The point on screen.
    1182      * @param ignore a collection of ways which are not to be returned.
    1183      * @param predicate the returned object has to fulfill certain properties.
    11841184     */
    11851185    public final List<OsmPrimitive> getNearestNodesOrWays(Point p,
     
    12071207     * It solely depends on the distance to point p.
    12081208     *
     1209     * @param p The point on screen.
     1210     * @param predicate the returned object has to fulfill certain properties.
    12091211     * @return Primitives nearest to the given screen point.
    12101212     * @see #getNearestNodesOrWays(Point, Collection, Predicate)
    1211      *
    1212      * @param p The point on screen.
    1213      * @param predicate the returned object has to fulfill certain properties.
    12141213     */
    12151214    public final List<OsmPrimitive> getNearestNodesOrWays(Point p, Predicate<OsmPrimitive> predicate) {
     
    12201219     * This is used as a helper routine to {@link #getNearestNodeOrWay(Point, Predicate, boolean)}
    12211220     * It decides, whether to yield the node to be tested or look for further (way) candidates.
    1222      *
    1223      * @return true, if the node fulfills the properties of the function body
    12241221     *
    12251222     * @param osm node to check
    12261223     * @param p point clicked
    12271224     * @param use_selected whether to prefer selected nodes
     1225     * @return true, if the node fulfills the properties of the function body
    12281226     */
    12291227    private boolean isPrecedenceNode(Node osm, Point p, boolean use_selected) {
     
    14521450     * Sets the current system of measurement.
    14531451     * @param somKey The system of measurement key. Must be defined in {@link SystemOfMeasurement#ALL_SYSTEMS}.
     1452     * @throws IllegalArgumentException if {@code somKey} is not known
    14541453     * @since 6056
    1455      * @throws IllegalArgumentException if {@code somKey} is not known
    14561454     */
    14571455    public static void setSystemOfMeasurement(String somKey) {
  • trunk/src/org/openstreetmap/josm/gui/Notification.java

    r6889 r8419  
    8282     * @param content any Component to be shown
    8383     *
     84     * @return the current Object, for convenience
    8485     * @see #setContent(java.lang.String)
    85      * @return the current Object, for convenience
    8686     */
    8787    public Notification setContent(Component content) {
     
    9696     * you can use &lt;br&gt; and other markup directly.
    9797     *
     98     * @return the current Object, for convenience
    9899     * @see #Notification(java.lang.String)
    99      * @return the current Object, for convenience
    100100     */
    101101    public Notification setContent(String msg) {
  • trunk/src/org/openstreetmap/josm/gui/actionsupport/LogShowDialog.java

    r7937 r8419  
    2323
    2424
    25     public LogShowDialog (String title, String msg, String log) {
     25    public LogShowDialog(String title, String msg, String log) {
    2626        super(Main.parent, title, new String[] {tr("OK")});
    2727        setButtonIcons(new String[] {"ok.png"});
     
    3232        JPanel p = new JPanel(new GridBagLayout());
    3333        JLabel lbl = new JLabel(msg);
    34        
     34
    3535        lbl.setFont(lbl.getFont().deriveFont(0, 14));
    36        
     36
    3737        p.add(lbl, GBC.eol().insets(5,0,5,0));
    3838        JosmEditorPane txt = new JosmEditorPane();
     
    4141        txt.setEditable(false);
    4242        txt.setOpaque(false);
    43        
     43
    4444        JScrollPane sp = new JScrollPane(txt);
    4545        sp.setOpaque(false);
    4646        sp.setPreferredSize(new Dimension(600,300));
    47        
    48        
     47
     48
    4949        p.add(sp, GBC.eop().insets(5,15,0,0).fill(GBC.HORIZONTAL));
    5050
  • trunk/src/org/openstreetmap/josm/gui/bbox/TileSelectionBBoxChooser.java

    r8413 r8419  
    634634     * Represents a rectangular area of tiles at a given zoom level.
    635635     */
    636     private static class TileBounds {
     636    private static final class TileBounds {
    637637        private Point min;
    638638        private Point max;
     
    664664     * The map view used in this bounding box chooser
    665665     */
    666     private static class TileBoundsMapView extends JMapViewer {
     666    private static final class TileBoundsMapView extends JMapViewer {
    667667        private Point min;
    668668        private Point max;
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMerger.java

    r8377 r8419  
    782782     *
    783783     */
    784     private class FreezeAction extends AbstractAction implements ItemListener, FreezeActionProperties  {
     784    private final class FreezeAction extends AbstractAction implements ItemListener, FreezeActionProperties  {
    785785
    786786        private FreezeAction() {
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/PasteTagsConflictResolverDialog.java

    r8401 r8419  
    269269    }
    270270
    271     class CancelAction extends AbstractAction {
     271    final class CancelAction extends AbstractAction {
    272272
    273273        private CancelAction() {
     
    285285    }
    286286
    287     class ApplyAction extends AbstractAction implements PropertyChangeListener {
     287    final class ApplyAction extends AbstractAction implements PropertyChangeListener {
    288288
    289289        private ApplyAction() {
     
    359359    }
    360360
    361     private static class StatisticsInfo {
     361    private static final class StatisticsInfo {
    362362        public int numTags;
    363363        public Map<OsmPrimitiveType, Integer> sourceInfo;
     
    370370    }
    371371
    372     private static class StatisticsTableColumnModel extends DefaultTableColumnModel {
     372    private static final class StatisticsTableColumnModel extends DefaultTableColumnModel {
    373373        private StatisticsTableColumnModel() {
    374374            TableCellRenderer renderer = new StatisticsInfoRenderer();
     
    398398    }
    399399
    400     private static class StatisticsTableModel extends DefaultTableModel {
     400    private static final class StatisticsTableModel extends DefaultTableModel {
    401401        private static final String[] HEADERS = new String[] {tr("Paste ..."), tr("From ..."), tr("To ...") };
    402402        private transient List<StatisticsInfo> data;
     
    508508    }
    509509
    510     private static class StatisticsInfoTable extends JPanel {
     510    private static final class StatisticsInfoTable extends JPanel {
    511511
    512512        private JTable infoTable;
  • trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictDialog.java

    r8378 r8419  
    6969     *
    7070     * @return the color used to paint conflicts
     71     * @see #paintConflicts
    7172     * @since 1221
    72      * @see #paintConflicts
    7373     */
    7474    public static Color getColor() {
     
    442442    }
    443443
    444     class SelectAction extends AbstractSelectAction implements ListSelectionListener {
     444    final class SelectAction extends AbstractSelectAction implements ListSelectionListener {
    445445        private SelectAction() {
    446446            putValue("help", ht("/Dialog/ConflictList#SelectAction"));
  • trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListPopup.java

    r8308 r8419  
    107107        for (Action a : actions) {
    108108            if (a instanceof LayerAction) {
    109                 add (((LayerAction) a).createMenuComponent());
     109                add(((LayerAction) a).createMenuComponent());
    110110            } else {
    111111                add(new JMenuItem(a));
  • trunk/src/org/openstreetmap/josm/gui/dialogs/ValidatorDialog.java

    r8413 r8419  
    569569        public FixTask(Collection<TestError> testErrors) {
    570570            super(tr("Fixing errors ..."), false /* don't ignore exceptions */);
    571             this.testErrors = testErrors == null ? new ArrayList<TestError> (): testErrors;
     571            this.testErrors = testErrors == null ? new ArrayList<TestError>(): testErrors;
    572572        }
    573573
  • trunk/src/org/openstreetmap/josm/gui/history/VersionTable.java

    r8377 r8419  
    120120    }
    121121
    122     class MouseListener extends PopupMenuLauncher {
     122    final class MouseListener extends PopupMenuLauncher {
    123123        private MouseListener() {
    124124            super(popupMenu);
  • trunk/src/org/openstreetmap/josm/gui/io/CredentialDialog.java

    r8395 r8419  
    343343        protected JTextField nextTF;
    344344
    345         public TFKeyListener (CredentialDialog owner, JTextField currentTF, JTextField nextTF) {
     345        public TFKeyListener(CredentialDialog owner, JTextField currentTF, JTextField nextTF) {
    346346            this.owner = owner;
    347347            this.currentTF = currentTF;
     
    371371
    372372        @Override
    373         public void keyTyped ( KeyEvent e ){
     373        public void keyTyped(KeyEvent e) {
    374374        }
    375375    }
  • trunk/src/org/openstreetmap/josm/gui/layer/Layer.java

    r8413 r8419  
    478478     * When the user has chosen a file, checks the file extension, and confirms overwrite if needed.
    479479     * @return The output {@code File}
     480     * @see SaveActionBase#createAndOpenSaveFileChooser
    480481     * @since 5459
    481      * @see SaveActionBase#createAndOpenSaveFileChooser
    482482     */
    483483    public File createAndOpenSaveFileChooser() {
  • trunk/src/org/openstreetmap/josm/gui/layer/WMSLayer.java

    r8404 r8419  
    320320    }
    321321
    322     private int modulo (int a, int b) {
     322    private int modulo(int a, int b) {
    323323        return a % b >= 0 ? a%b : a%b+b;
    324324    }
  • trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayer.java

    r8395 r8419  
    254254        components.add(new SynchronizeAudio());
    255255        if (Main.pref.getBoolean("marker.traceaudio", true)) {
    256             components.add (new MoveAudio());
     256            components.add(new MoveAudio());
    257257        }
    258258        components.add(new JumpToNextMarker(this));
  • trunk/src/org/openstreetmap/josm/gui/mappaint/Environment.java

    r8415 r8419  
    117117     * @param count count of nodes in parent way or members in parent relation
    118118     * @return A clone of this environment, with the specified parent, index, and context set to {@link Context#LINK}
    119      * @since 6175
    120119     * @see #parent
    121120     * @see #index
     121     * @since 6175
    122122     */
    123123    public Environment withParentAndIndexAndLinkContext(OsmPrimitive parent, int index, int count) {
  • trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java

    r8404 r8419  
    109109     * @param test if <code>true</code> than the icon is request is tested
    110110     * @return image provider for icon (can be <code>null</code> when <code>test</code> is <code>true</code>).
     111     * @see #getIcon(IconReference, int,int)
    111112     * @since 8097
    112      * @see #getIcon(IconReference, int,int)
    113113     */
    114114    public static ImageProvider getIconProvider(IconReference ref, boolean test) {
  • trunk/src/org/openstreetmap/josm/gui/mappaint/StyleSource.java

    r8297 r8419  
    114114     * Closes the source input stream previously returned by {@link #getSourceInputStream()} and other linked resources, if applicable.
    115115     * @param is The source input stream that must be closed
     116     * @see #getSourceInputStream()
    116117     * @since 6289
    117      * @see #getSourceInputStream()
    118118     */
    119119    public void closeSourceInputStream(InputStream is) {
     
    142142     *
    143143     * @return image provider for default styles icon
     144     * @see #getIconProvider()
    144145     * @since 8097
    145      * @see #getIconProvider()
    146146     */
    147147    private static synchronized ImageProvider getDefaultIconProvider() {
     
    156156     *
    157157     * @return image provider for styles icon
     158     * @see #getIconProvider()
    158159     * @since 8097
    159      * @see #getIconProvider()
    160160     */
    161161    protected ImageProvider getSourceIconProvider() {
  • trunk/src/org/openstreetmap/josm/gui/mappaint/xml/AreaPrototype.java

    r6890 r8419  
    1010    public boolean closed; // if true, it does not apply to unclosed ways
    1111
    12     public AreaPrototype (AreaPrototype a, Range range) {
     12    public AreaPrototype(AreaPrototype a, Range range) {
    1313        super(range);
    1414        this.color = a.color;
  • trunk/src/org/openstreetmap/josm/gui/mappaint/xml/IconPrototype.java

    r6890 r8419  
    1010    public Boolean annotate;
    1111
    12     public IconPrototype (IconPrototype i, Range range) {
     12    public IconPrototype(IconPrototype i, Range range) {
    1313        super(range);
    1414        this.icon = i.icon;
  • trunk/src/org/openstreetmap/josm/gui/preferences/display/GPXSettingsPanel.java

    r8308 r8419  
    319319     * Loads preferences to UI controls
    320320     */
    321     public final void loadPreferences () {
     321    public final void loadPreferences() {
    322322        makeAutoMarkers.setSelected(Main.pref.getBoolean("marker.makeautomarkers", true));
    323323        if(layerName!=null && Main.pref.get("draw.rawgps.lines."+layerName).isEmpty()
  • trunk/src/org/openstreetmap/josm/gui/preferences/shortcut/PrefJPanel.java

    r8413 r8419  
    276276    private class CbAction extends AbstractAction implements ListSelectionListener {
    277277        private PrefJPanel panel;
    278         public CbAction (PrefJPanel panel) {
     278        public CbAction(PrefJPanel panel) {
    279279            this.panel = panel;
    280280        }
     
    359359            try {
    360360                final TableRowSorter<? extends TableModel> sorter =
    361                     (TableRowSorter<? extends TableModel> )shortcutTable.getRowSorter();
     361                    (TableRowSorter<? extends TableModel>)shortcutTable.getRowSorter();
    362362                if (expr == null) {
    363363                    sorter.setRowFilter(null);
  • trunk/src/org/openstreetmap/josm/gui/util/GuiHelper.java

    r8374 r8419  
    376376     * Sets a global font for all UI, replacing default font of current look and feel.
    377377     * @param name Font name. It is up to the caller to make sure the font exists
     378     * @throws IllegalArgumentException if name is null
    378379     * @since 7896
    379      * @throws IllegalArgumentException if name is null
    380380     */
    381381    public static void setUIFont(String name) {
  • trunk/src/org/openstreetmap/josm/gui/widgets/AbstractFileChooser.java

    r8291 r8419  
    7272     * file from a list in the UI.
    7373     *
     74     * @return the selected file
    7475     * @see #setSelectedFile
    75      * @return the selected file
    7676     */
    7777    public abstract File getSelectedFile();
     
    175175     * to be the file's parent directory.
    176176     *
     177     * @param file the selected file
    177178     * @see #getSelectedFile
    178      *
    179      * @param file the selected file
    180179     */
    181180    public abstract void setSelectedFile(File file);
  • trunk/src/org/openstreetmap/josm/gui/widgets/JosmPasswordField.java

    r7937 r8419  
    1919 * <a href="https://bugs.openjdk.java.net/browse/JDK-6322854">JDK bug 6322854</a>.
    2020 *
    21  * @since 5752
    2221 * @see <a href="https://josm.openstreetmap.de/ticket/8404">https://josm.openstreetmap.de/ticket/8404</a>
    2322 * @see <a href="https://hg.netbeans.org/main/rev/33cb2e81b640">https://hg.netbeans.org/main/rev/33cb2e81b640</a>
     23 * @since 5752
    2424 */
    2525public class JosmPasswordField extends JPasswordField implements FocusListener {
  • trunk/src/org/openstreetmap/josm/gui/widgets/MultiSplitLayout.java

    r8415 r8419  
    687687
    688688    /**
    689      * The specified Node is either the wrong type or was configured
    690      * incorrectly.
     689     * The specified Node is either the wrong type or was configured incorrectly.
    691690     */
    692691    public static class InvalidLayoutException extends RuntimeException {
    693692        private final transient Node node;
    694         public InvalidLayoutException (String msg, Node node) {
     693        public InvalidLayoutException(String msg, Node node) {
    695694            super(msg);
    696695            this.node = node;
     
    897896         *
    898897         * @param weight a double between 0.0 and 1.0
     898         * @throws IllegalArgumentException if weight is not between 0.0 and 1.0
    899899         * @see #getWeight
    900900         * @see MultiSplitLayout#layoutContainer
    901          * @throws IllegalArgumentException if weight is not between 0.0 and 1.0
    902901         */
    903902        public void setWeight(double weight) {
     
    998997         *
    999998         * @param children List of children
     999         * @throws IllegalArgumentException if children is null
    10001000         * @see #getChildren
    1001          * @throws IllegalArgumentException if children is null
    10021001         */
    10031002        public void setChildren(List<Node> children) {
     
    12201219    }
    12211220
    1222     private static Node parseModel (Reader r) {
     1221    private static Node parseModel(Reader r) {
    12231222        StreamTokenizer st = new StreamTokenizer(r);
    12241223        try {
  • trunk/src/org/openstreetmap/josm/io/AbstractReader.java

    r8378 r8419  
    9191                if (n == null) {
    9292                    if (id <= 0)
    93                         throw new IllegalDataException (
     93                        throw new IllegalDataException(
    9494                                tr("Way with external ID ''{0}'' includes missing node with external ID ''{1}''.",
    9595                                        externalWayId,
  • trunk/src/org/openstreetmap/josm/io/CacheCustomContent.java

    r8332 r8419  
    1414/**
    1515 * Use this class if you want to cache and store a single file that gets updated regularly.
    16  * Unless you flush() it will be kept in memory. If you want to cache a lot of data and/or files,
    17  * use CacheFiles
     16 * Unless you flush() it will be kept in memory. If you want to cache a lot of data and/or files, use CacheFiles.
     17 * @author xeen
    1818 * @param <T> a {@link Throwable} that may be thrown during {@link #updateData()},
    1919 * use {@link RuntimeException} if no exception must be handled.
    20  * @author xeen
    2120 * @since 1450
    2221 */
  • trunk/src/org/openstreetmap/josm/io/auth/CredentialsManager.java

    r8126 r8419  
    7777     * @return The type of credentials agent
    7878     */
    79     public final Class<? extends CredentialsAgent> getCredentialsAgentClass () {
     79    public final Class<? extends CredentialsAgent> getCredentialsAgentClass() {
    8080        return delegate.getClass();
    8181    }
  • trunk/src/org/openstreetmap/josm/tools/AlphanumComparator.java

    r8378 r8419  
    4040 *
    4141 */
    42 public class AlphanumComparator implements Comparator<String>, Serializable {
     42public final class AlphanumComparator implements Comparator<String>, Serializable {
    4343
    4444    private static final long serialVersionUID = 1L;
  • trunk/src/org/openstreetmap/josm/tools/AudioPlayer.java

    r8413 r8419  
    7979                throw new InterruptedException();
    8080        }
    81         protected void failed (Exception e) {
     81        protected void failed(Exception e) {
    8282            exception = e;
    8383            result = Result.FAILED;
    8484            state = State.NOTPLAYING;
    8585        }
    86         protected void ok (State newState) {
     86        protected void ok(State newState) {
    8787            result = Result.OK;
    8888            state = newState;
  • trunk/src/org/openstreetmap/josm/tools/ColorScale.java

    r7937 r8419  
    1010 * @since 7319
    1111 */
    12 public class ColorScale {
     12public final class ColorScale {
    1313    private double min, max;
    1414    private Color noDataColor;
  • trunk/src/org/openstreetmap/josm/tools/Diff.java

    r8395 r8419  
    152152     It cannot cause incorrect diff output.  */
    153153
    154     private int diag (int xoff, int xlim, int yoff, int ylim) {
     154    private int diag(int xoff, int xlim, int yoff, int ylim) {
    155155        final int[] fd = fdiag; // Give the compiler a chance.
    156156        final int[] bd = bdiag; // Additional help for the compiler.
     
    323323     All line numbers are origin-0 and discarded lines are not counted.  */
    324324
    325     private void compareseq (int xoff, int xlim, int yoff, int ylim) {
     325    private void compareseq(int xoff, int xlim, int yoff, int ylim) {
    326326        /* Slide down the bottom initial diagonal. */
    327327        while (xoff < xlim && yoff < ylim && xvec[xoff] == yvec[yoff]) {
     
    345345            /* Find a point of correspondence in the middle of the files.  */
    346346
    347             int d = diag (xoff, xlim, yoff, ylim);
     347            int d = diag(xoff, xlim, yoff, ylim);
    348348            int c = cost;
    349349            int b = bdiag[bdiagoff + d];
     
    357357            else {
    358358                /* Use that point to split this problem into two subproblems.  */
    359                 compareseq (xoff, b, yoff, b - d);
     359                compareseq(xoff, b, yoff, b - d);
    360360                /* This used to use f instead of b,
    361361                   but that is incorrect!
    362362                   It is not necessarily the case that diagonal d
    363363                   has a snake from b to f.  */
    364                 compareseq (b, xlim, b - d, ylim);
     364                compareseq(b, xlim, b - d, ylim);
    365365            }
    366366        }
     
    494494       and avoid even thinking about them in the main comparison algorithm.  */
    495495
    496         discard_confusing_lines ();
     496        discard_confusing_lines();
    497497
    498498        /* Now do the main comparison algorithm, considering just the
     
    509509        bdiagoff = filevec[1].nondiscardedLines + 1;
    510510
    511         compareseq (0, filevec[0].nondiscardedLines,
     511        compareseq(0, filevec[0].nondiscardedLines,
    512512                0, filevec[1].nondiscardedLines);
    513513        fdiag = null;
     
    517517       in cases where that can validly be done.  */
    518518
    519         shift_boundaries ();
     519        shift_boundaries();
    520520
    521521        /* Get the results of comparison in the form of a chain
     
    631631         * Mark to be discarded each line that matches no line of another file.
    632632         * If a line matches many lines, mark it as provisionally discardable.
     633         * @param counts The count of each equivalence number for the other file.
     634         * @return 0=nondiscardable, 1=discardable or 2=provisionally discardable for each line
    633635         * @see #equivCount()
    634          * @param counts The count of each equivalence number for the other file.
    635          * @return 0=nondiscardable, 1=discardable or 2=provisionally discardable
    636          *  for each line
    637636         */
    638637        private byte[] discardable(final int[] counts) {
  • trunk/src/org/openstreetmap/josm/tools/FontsManager.java

    r8308 r8419  
    1717 * @since 7383
    1818 */
    19 public class FontsManager {
     19public final class FontsManager {
    2020
    2121    /**
  • trunk/src/org/openstreetmap/josm/tools/Geometry.java

    r8395 r8419  
    424424     * @param point Point for which a closest point is searched on line (P1,P2)
    425425     * @return The closest point found on line. It may be outside the segment [P1,P2].
     426     * @see #closestPointToSegment
    426427     * @since 4134
    427      * @see #closestPointToSegment
    428428     */
    429429    public static EastNorth closestPointToLine(EastNorth lineP1, EastNorth lineP2, EastNorth point) {
     
    690690    /**
    691691     * Determines whether path from nodes list is oriented clockwise.
    692      * @see #isClockwise(Way)
    693692     * @param nodes Nodes list to be checked.
    694693     * @return true if and only if way is oriented clockwise.
    695694     * @throws IllegalArgumentException if way is not closed (see {@link Way#isClosed}).
     695     * @see #isClockwise(Way)
    696696     */
    697697    public static boolean isClockwise(List<Node> nodes) {
  • trunk/src/org/openstreetmap/josm/tools/ImageProvider.java

    r8412 r8419  
    466466     * Limit the maximum width of the image.
    467467     * @param maxWidth maximum image width
     468     * @return the current object, for convenience
    468469     * @see #setMaxSize
    469      * @return the current object, for convenience
    470470     */
    471471    public ImageProvider setMaxWidth(int maxWidth) {
     
    477477     * Limit the maximum height of the image.
    478478     * @param maxHeight maximum image height
     479     * @return the current object, for convenience
    479480     * @see #setMaxSize
    480      * @return the current object, for convenience
    481481     */
    482482    public ImageProvider setMaxHeight(int maxHeight) {
     
    11021102            parser.setEntityResolver(new EntityResolver() {
    11031103                @Override
    1104                 public InputSource resolveEntity (String publicId, String systemId) {
     1104                public InputSource resolveEntity(String publicId, String systemId) {
    11051105                    return new InputSource(new ByteArrayInputStream(new byte[0]));
    11061106                }
     
    15451545     * @return the {@code TransparentColor} defined in image reader metadata, or {@code null}
    15461546     * @throws IOException if an error occurs during reading
     1547     * @see <a href="http://docs.oracle.com/javase/7/docs/api/javax/imageio/metadata/doc-files/standard_metadata.html">javax_imageio_1.0 metadata</a>
    15471548     * @since 7499
    1548      * @see <a href="http://docs.oracle.com/javase/7/docs/api/javax/imageio/metadata/doc-files/standard_metadata.html">javax_imageio_1.0 metadata</a>
    15491549     */
    15501550    public static Color getTransparentColor(ColorModel model, ImageReader reader) throws IOException {
  • trunk/src/org/openstreetmap/josm/tools/LanguageInfo.java

    r8404 r8419  
    225225     *
    226226     * @param locale the locale to use, <code>null</code> for default locale
     227     * @return list of codes
    227228     * @since 8283
    228      * @return list of codes
    229229     */
    230230    public static Collection<String> getLanguageCodes(Locale l) {
  • trunk/src/org/openstreetmap/josm/tools/Shortcut.java

    r8395 r8419  
    218218        if (keyStroke == null) return "";
    219219        String modifText = KeyEvent.getKeyModifiersText(keyStroke.getModifiers());
    220         if ("".equals (modifText)) return KeyEvent.getKeyText (keyStroke.getKeyCode ());
    221         return modifText + "+" + KeyEvent.getKeyText(keyStroke.getKeyCode ());
     220        if ("".equals (modifText)) return KeyEvent.getKeyText(keyStroke.getKeyCode());
     221        return modifText + "+" + KeyEvent.getKeyText(keyStroke.getKeyCode());
    222222    }
    223223
  • trunk/src/org/openstreetmap/josm/tools/Utils.java

    r8404 r8419  
    878878    /**
    879879     * An alternative to {@link String#trim()} to effectively remove all leading and trailing white characters, including Unicode ones.
    880      * @see <a href="http://closingbraces.net/2008/11/11/javastringtrim/">Java’s String.trim has a strange idea of whitespace</a>
    881      * @see <a href="https://bugs.openjdk.java.net/browse/JDK-4080617">JDK bug 4080617</a>
    882880     * @param str The string to strip
    883881     * @return <code>str</code>, without leading and trailing characters, according to
    884882     *         {@link Character#isWhitespace(char)} and {@link Character#isSpaceChar(char)}.
     883     * @see <a href="http://closingbraces.net/2008/11/11/javastringtrim/">Java’s String.trim has a strange idea of whitespace</a>
     884     * @see <a href="https://bugs.openjdk.java.net/browse/JDK-4080617">JDK bug 4080617</a>
    885885     * @since 5772
    886886     */
  • trunk/src/org/openstreetmap/josm/tools/XmlObjectParser.java

    r8390 r8419  
    5454
    5555        @Override
    56         public void startElement (String uri, String localName, String qName, Attributes atts) throws SAXException {
     56        public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException {
    5757            if ("".equals(uri)) {
    5858                super.startElement(namespace, localName, qName, atts);
Note: See TracChangeset for help on using the changeset viewer.