Changeset 6362 in josm


Ignore:
Timestamp:
2013-11-03T01:06:23+01:00 (7 years ago)
Author:
Don-vip
Message:

Checkstyle:

  • private constructors for util classes
  • final classes
  • missing "else" statements
  • import cleanup
Location:
trunk/src/org/openstreetmap/josm
Files:
94 edited

Legend:

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

    r5909 r6362  
    1919 * @author imi
    2020 */
    21 public class SaveAction extends SaveActionBase {
     21public final class SaveAction extends SaveActionBase {
    2222    private static SaveAction instance = new SaveAction();
    2323
  • trunk/src/org/openstreetmap/josm/actions/mapmode/ImproveWayAccuracyHelper.java

    r6360 r6362  
    2222 * @author Alexander Kachkaev <alexander@kachkaev.ru>, 2011
    2323 */
    24 class ImproveWayAccuracyHelper {
     24final class ImproveWayAccuracyHelper {
    2525
    2626    private ImproveWayAccuracyHelper() {
  • trunk/src/org/openstreetmap/josm/actions/upload/RelationUploadOrderHook.java

    r6267 r6362  
    11// License: GPL. For details, see LICENSE file.
    22package org.openstreetmap.josm.actions.upload;
     3
     4import static org.openstreetmap.josm.tools.I18n.tr;
    35
    46import java.awt.BorderLayout;
     
    1921import org.openstreetmap.josm.gui.OsmPrimitivRenderer;
    2022import org.openstreetmap.josm.tools.WindowGeometry;
    21 
    22 import static org.openstreetmap.josm.tools.I18n.tr;
    23 
    24 import org.openstreetmap.josm.actions.upload.UploadHook;
    2523
    2624/**
  • trunk/src/org/openstreetmap/josm/corrector/ReverseWayNoTagCorrector.java

    r6360 r6362  
    2323 * @since 5724
    2424 */
    25 public class ReverseWayNoTagCorrector {
     25public final class ReverseWayNoTagCorrector {
    2626
    2727    private ReverseWayNoTagCorrector() {
  • trunk/src/org/openstreetmap/josm/data/CustomConfigurator.java

    r6360 r6362  
    5555 * can be used to modify preferences, store/delete files in .josm folders etc
    5656 */
    57 public class CustomConfigurator {
     57public final class CustomConfigurator {
    5858   
    5959    private CustomConfigurator() {
  • trunk/src/org/openstreetmap/josm/data/coor/QuadTiling.java

    r6360 r6362  
    22package org.openstreetmap.josm.data.coor;
    33
    4 public class QuadTiling {
     4public final class QuadTiling {
    55   
    66    private QuadTiling() {
  • trunk/src/org/openstreetmap/josm/data/osm/ChangesetCache.java

    r5890 r6362  
    3232 *
    3333 */
    34 public class ChangesetCache implements PreferenceChangedListener{
     34public final class ChangesetCache implements PreferenceChangedListener{
    3535    /** the unique instance */
    3636    static private final ChangesetCache instance = new ChangesetCache();
  • trunk/src/org/openstreetmap/josm/data/osm/FilterWorker.java

    r6360 r6362  
    1212 * @author Petr_Dlouhý
    1313 */
    14 public class FilterWorker {
     14public final class FilterWorker {
    1515   
    1616    private FilterWorker() {
  • trunk/src/org/openstreetmap/josm/data/osm/OsmUtils.java

    r6360 r6362  
    77import java.util.Locale;
    88
    9 public class OsmUtils {
     9public final class OsmUtils {
    1010   
    1111    private OsmUtils() {
  • trunk/src/org/openstreetmap/josm/data/osm/Storage.java

    r6226 r6362  
    392392     */
    393393
    394     private class FMap<K> implements Map<K,T> {
     394    private final class FMap<K> implements Map<K,T> {
    395395        Hash<K,? super T> fHash;
    396396
  • trunk/src/org/openstreetmap/josm/data/osm/TigerUtils.java

    r6360 r6362  
    1111 * @since 529
    1212 */
    13 public class TigerUtils {
     13public final class TigerUtils {
    1414   
    1515    private TigerUtils() {
  • trunk/src/org/openstreetmap/josm/data/osm/User.java

    r6317 r6362  
    2323 *
    2424 */
    25 public class User {
     25public final class User {
    2626
    2727    static private AtomicLong uidCounter = new AtomicLong();
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapPaintSettings.java

    r6084 r6362  
    88import org.openstreetmap.josm.data.Preferences.PreferenceChangedListener;
    99
    10 public class MapPaintSettings implements PreferenceChangedListener {
     10public final class MapPaintSettings implements PreferenceChangedListener {
    1111
    1212    public static final MapPaintSettings INSTANCE = new MapPaintSettings();
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapRendererFactory.java

    r6248 r6362  
    3737 *
    3838 */
    39 public class MapRendererFactory {
     39public final class MapRendererFactory {
    4040
    4141    /** preference key for the renderer class name. Default: class name for {@link StyledMapRenderer}
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/relations/MultipolygonCache.java

    r5927 r6362  
    3838 *
    3939 */
    40 public class MultipolygonCache implements DataSetListener, LayerChangeListener, ProjectionChangeListener, SelectionChangedListener {
     40public final class MultipolygonCache implements DataSetListener, LayerChangeListener, ProjectionChangeListener, SelectionChangedListener {
    4141
    4242    private static final MultipolygonCache instance = new MultipolygonCache();
  • trunk/src/org/openstreetmap/josm/data/projection/Ellipsoid.java

    r5072 r6362  
    1313 * the reference ellipsoids
    1414 */
    15 public class Ellipsoid {
     15public final class Ellipsoid {
    1616    /**
    1717     * Clarke 1880 IGN (French national geographic institute)
  • trunk/src/org/openstreetmap/josm/data/projection/Projections.java

    r6360 r6362  
    3939 *
    4040 */
    41 public class Projections {
     41public final class Projections {
    4242
    4343    private Projections() {
  • trunk/src/org/openstreetmap/josm/data/projection/datum/GRS80Datum.java

    r5926 r6362  
    1010 * is necessary to get from or to the WGS84 datum.
    1111 */
    12 public class GRS80Datum extends NullDatum {
     12public final class GRS80Datum extends NullDatum {
    1313
    1414    public final static GRS80Datum INSTANCE = new GRS80Datum();
  • trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2Util.java

    r6310 r6362  
    2727 * @author Peter Yuill
    2828 */
    29 public class NTV2Util {
     29public final class NTV2Util {
    3030
    3131    private NTV2Util() {
  • trunk/src/org/openstreetmap/josm/data/projection/datum/WGS84Datum.java

    r5926 r6362  
    99 * WGS84 datum. Transformation from and to WGS84 datum is a no-op.
    1010 */
    11 public class WGS84Datum extends NullDatum {
     11public final class WGS84Datum extends NullDatum {
    1212
    1313    public static final WGS84Datum INSTANCE = new WGS84Datum();
  • trunk/src/org/openstreetmap/josm/data/projection/proj/LambertConformalConic.java

    r6142 r6362  
    22package org.openstreetmap.josm.data.projection.proj;
    33
    4 import static java.lang.Math.*;
    5 
     4import static java.lang.Math.PI;
     5import static java.lang.Math.abs;
     6import static java.lang.Math.atan;
     7import static java.lang.Math.cos;
     8import static java.lang.Math.exp;
     9import static java.lang.Math.log;
     10import static java.lang.Math.pow;
     11import static java.lang.Math.sin;
     12import static java.lang.Math.sqrt;
     13import static java.lang.Math.tan;
     14import static java.lang.Math.toRadians;
    615import static org.openstreetmap.josm.tools.I18n.tr;
    716
  • trunk/src/org/openstreetmap/josm/data/projection/proj/Mercator.java

    r5237 r6362  
    22package org.openstreetmap.josm.data.projection.proj;
    33
    4 import static java.lang.Math.*;
    5 
     4import static java.lang.Math.PI;
     5import static java.lang.Math.atan;
     6import static java.lang.Math.log;
     7import static java.lang.Math.sinh;
     8import static java.lang.Math.tan;
    69import static org.openstreetmap.josm.tools.I18n.tr;
    710
  • trunk/src/org/openstreetmap/josm/data/projection/proj/TransverseMercator.java

    r5926 r6362  
    22package org.openstreetmap.josm.data.projection.proj;
    33
    4 import static java.lang.Math.*;
    5 
     4import static java.lang.Math.cos;
     5import static java.lang.Math.pow;
     6import static java.lang.Math.sin;
     7import static java.lang.Math.sqrt;
     8import static java.lang.Math.tan;
    69import static org.openstreetmap.josm.tools.I18n.tr;
    710
  • trunk/src/org/openstreetmap/josm/data/validation/util/ValUtil.java

    r6360 r6362  
    1919 * @author frsantos
    2020 */
    21 public class ValUtil {
     21public final class ValUtil {
    2222   
    2323    private ValUtil() {
  • trunk/src/org/openstreetmap/josm/gui/ConditionalOptionPaneUtil.java

    r5817 r6362  
    2626 *
    2727 */
    28 public class ConditionalOptionPaneUtil {
     28public final class ConditionalOptionPaneUtil {
    2929    static public final int DIALOG_DISABLED_OPTION = Integer.MIN_VALUE;
    3030
  • trunk/src/org/openstreetmap/josm/gui/ExceptionDialogUtil.java

    r6349 r6362  
    3131 *
    3232 */
    33 public class ExceptionDialogUtil {
     33public final class ExceptionDialogUtil {
    3434
    3535    /**
  • trunk/src/org/openstreetmap/josm/gui/HelpAwareOptionPane.java

    r6360 r6362  
    3434import org.openstreetmap.josm.tools.WindowGeometry;
    3535
    36 public class HelpAwareOptionPane {
     36public final class HelpAwareOptionPane {
    3737
    3838    private HelpAwareOptionPane() {
  • trunk/src/org/openstreetmap/josm/gui/JosmUserIdentityManager.java

    r6349 r6362  
    4949 *
    5050 */
    51 public class JosmUserIdentityManager implements PreferenceChangedListener{
     51public final class JosmUserIdentityManager implements PreferenceChangedListener{
    5252
    5353    static private JosmUserIdentityManager instance;
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/MultiValueCellEditor.java

    r6084 r6362  
    7474                if (e.getID() == KeyEvent.KEY_PRESSED && e.getKeyCode() == KeyEvent.VK_ENTER) {
    7575                    fireGotoNextDecision();
    76                 } if (e.getID() == KeyEvent.KEY_PRESSED && e.getKeyCode() == KeyEvent.VK_TAB) {
     76                } else if (e.getID() == KeyEvent.KEY_PRESSED && e.getKeyCode() == KeyEvent.VK_TAB) {
    7777                    if (e.isShiftDown()) {
    7878                        fireGotoPreviousDecision();
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictDecision.java

    r3083 r6362  
    11// License: GPL. For details, see LICENSE file.
    22package org.openstreetmap.josm.gui.conflict.tags;
     3
     4import static org.openstreetmap.josm.gui.conflict.tags.RelationMemberConflictDecisionType.UNDECIDED;
     5import static org.openstreetmap.josm.tools.I18n.tr;
    36
    47import org.openstreetmap.josm.data.osm.OsmPrimitive;
     
    69import org.openstreetmap.josm.data.osm.RelationMember;
    710import org.openstreetmap.josm.tools.CheckParameterUtil;
    8 
    9 import static org.openstreetmap.josm.tools.I18n.tr;
    10 import static org.openstreetmap.josm.gui.conflict.tags.RelationMemberConflictDecisionType.*;
    1111
    1212public class RelationMemberConflictDecision {
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolutionUtil.java

    r6093 r6362  
    1313 *
    1414 */
    15 public class TagConflictResolutionUtil {
     15public final class TagConflictResolutionUtil {
    1616
    1717    /** no constructor, just static utility methods */
  • trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java

    r6336 r6362  
    11041104     * the properties {@link Layer#VISIBLE_PROP} and {@link Layer#NAME_PROP}.
    11051105     */
    1106     public class LayerListModel extends AbstractTableModel implements MapView.LayerChangeListener, PropertyChangeListener {
     1106    public final class LayerListModel extends AbstractTableModel implements MapView.LayerChangeListener, PropertyChangeListener {
    11071107        /** manages list selection state*/
    11081108        private DefaultListSelectionModel selectionModel;
  • trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java

    r6324 r6362  
    221221    }
    222222
    223     public class EditTagDialog extends AbstractTagsDialog {
     223    public final class EditTagDialog extends AbstractTagsDialog {
    224224        final String key;
    225225        final Map<String, Integer> m;
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/RelationSortUtils.java

    r6360 r6362  
    1111import org.openstreetmap.josm.gui.dialogs.relation.sort.WayConnectionType.Direction;
    1212
    13 class RelationSortUtils {
     13final class RelationSortUtils {
    1414
    1515    private RelationSortUtils() {
  • trunk/src/org/openstreetmap/josm/gui/help/HelpUtil.java

    r6360 r6362  
    1616import org.openstreetmap.josm.tools.LanguageInfo.LocaleType;
    1717
    18 public class HelpUtil {
     18public final class HelpUtil {
    1919
    2020    private HelpUtil() {
  • trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserModel.java

    r6336 r6362  
    403403     *
    404404     */
    405     public class VersionTableModel extends AbstractTableModel {
     405    public final class VersionTableModel extends AbstractTableModel {
    406406
    407407        private VersionTableModel() {
  • trunk/src/org/openstreetmap/josm/gui/layer/CustomizeColor.java

    r6070 r6362  
    88import java.awt.Component;
    99import java.awt.event.ActionEvent;
     10import java.util.LinkedList;
     11import java.util.List;
    1012
    1113import javax.swing.AbstractAction;
     
    1416import javax.swing.JMenuItem;
    1517import javax.swing.JOptionPane;
    16 import java.util.LinkedList;
    17 import java.util.List;
    1818
    1919import org.openstreetmap.josm.Main;
    20 import org.openstreetmap.josm.gui.layer.Layer;
    2120import org.openstreetmap.josm.gui.layer.Layer.LayerAction;
    2221import org.openstreetmap.josm.gui.layer.Layer.MultiLayerAction;
  • trunk/src/org/openstreetmap/josm/gui/layer/JumpToMarkerActions.java

    r6360 r6362  
    1616import org.openstreetmap.josm.tools.Shortcut;
    1717
    18 public class JumpToMarkerActions {
     18public final class JumpToMarkerActions {
    1919
    2020    public interface JumpToMarkerLayer {
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageViewerDialog.java

    r6296 r6362  
    2323
    2424import org.openstreetmap.josm.Main;
     25import org.openstreetmap.josm.gui.dialogs.DialogsPanel.Action;
    2526import org.openstreetmap.josm.gui.dialogs.ToggleDialog;
    26 import org.openstreetmap.josm.gui.dialogs.DialogsPanel.Action;
    2727import org.openstreetmap.josm.tools.ImageProvider;
    2828import org.openstreetmap.josm.tools.Shortcut;
    2929
    30 public class ImageViewerDialog extends ToggleDialog {
     30public final class ImageViewerDialog extends ToggleDialog {
    3131
    3232    private static final String COMMAND_ZOOM = "zoom";
  • trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/Marker.java

    r6310 r6362  
    8181public class Marker implements TemplateEngineDataProvider {
    8282
    83     public static class TemplateEntryProperty extends CachedProperty<TemplateEntry> {
     83    public static final class TemplateEntryProperty extends CachedProperty<TemplateEntry> {
    8484        // This class is a bit complicated because it supports both global and per layer settings. I've added per layer settings because
    8585        // GPXSettingsPanel had possibility to set waypoint label but then I've realized that markers use different layer then gpx data
  • trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/PlayHeadMarker.java

    r6299 r6362  
    3434 * @since 572
    3535 */
    36 public class PlayHeadMarker extends Marker {
     36public final class PlayHeadMarker extends Marker {
    3737
    3838    private Timer timer = null;
  • trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java

    r6360 r6362  
    3838 * On change, mapPaintSylesUpdated() is fired for all listeners.
    3939 */
    40 public class MapPaintStyles {
     40public final class MapPaintStyles {
    4141
    4242    private static ElemStyles styles = new ElemStyles();
  • trunk/src/org/openstreetmap/josm/gui/mappaint/StyleCache.java

    r6316 r6362  
    1919 * and its subclasses).
    2020 */
    21 public class StyleCache {
     21public final class StyleCache {
    2222    /* list of boundaries for the scale ranges */
    2323    private final List<Double> bd;
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/CSSColors.java

    r6360 r6362  
    66import java.util.Map;
    77
    8 public class CSSColors {
     8public final class CSSColors {
    99    private final static Map<String, Color> CSS_COLORS = new HashMap<String, Color>();
    1010    static {
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java

    r6360 r6362  
    2929 * See {@link #createFunctionExpression}.
    3030 */
    31 public class ExpressionFactory {
     31public final class ExpressionFactory {
    3232
    3333    private static final List<Method> arrayFunctions;
  • trunk/src/org/openstreetmap/josm/gui/oauth/TestAccessTokenTask.java

    r6116 r6362  
    261261                alertInternalError();
    262262                return;
    263             } if (e.getResponseCode() == HttpURLConnection.HTTP_UNAUTHORIZED) {
     263            } else if (e.getResponseCode() == HttpURLConnection.HTTP_UNAUTHORIZED) {
    264264                alertFailedAuthentication();
    265265                return;
  • trunk/src/org/openstreetmap/josm/gui/preferences/AudioPreference.java

    r6084 r6362  
    1212
    1313import org.openstreetmap.josm.Main;
     14import org.openstreetmap.josm.gui.widgets.JosmTextField;
    1415import org.openstreetmap.josm.tools.GBC;
    15 import org.openstreetmap.josm.gui.widgets.JosmTextField;
    1616
    1717/*
     
    2727 */
    2828
    29 public class AudioPreference extends DefaultTabPreferenceSetting {
     29public final class AudioPreference extends DefaultTabPreferenceSetting {
    3030
    3131    public static class Factory implements PreferenceSettingFactory {
  • trunk/src/org/openstreetmap/josm/gui/preferences/PluginPreference.java

    r6142 r6362  
    4545import org.openstreetmap.josm.gui.preferences.plugin.PluginUpdatePolicyPanel;
    4646import org.openstreetmap.josm.gui.util.GuiHelper;
     47import org.openstreetmap.josm.gui.widgets.JosmTextField;
    4748import org.openstreetmap.josm.gui.widgets.SelectAllOnFocusGainedDecorator;
    4849import org.openstreetmap.josm.plugins.PluginDownloadTask;
     
    5253import org.openstreetmap.josm.tools.GBC;
    5354import org.openstreetmap.josm.tools.ImageProvider;
    54 import org.openstreetmap.josm.gui.widgets.JosmTextField;
    55 
    56 public class PluginPreference extends DefaultTabPreferenceSetting {
     55
     56public final class PluginPreference extends DefaultTabPreferenceSetting {
    5757    public static class Factory implements PreferenceSettingFactory {
    5858        @Override
  • trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceTabbedPane.java

    r6310 r6362  
    2929import org.openstreetmap.josm.Main;
    3030import org.openstreetmap.josm.actions.ExpertToggleAction;
     31import org.openstreetmap.josm.actions.ExpertToggleAction.ExpertModeChangeListener;
    3132import org.openstreetmap.josm.actions.RestartAction;
    32 import org.openstreetmap.josm.actions.ExpertToggleAction.ExpertModeChangeListener;
    3333import org.openstreetmap.josm.gui.HelpAwareOptionPane;
    3434import org.openstreetmap.josm.gui.HelpAwareOptionPane.ButtonSpec;
     
    5959 * @author imi
    6060 */
    61 public class PreferenceTabbedPane extends JTabbedPane implements MouseWheelListener, ExpertModeChangeListener, ChangeListener {
     61public final class PreferenceTabbedPane extends JTabbedPane implements MouseWheelListener, ExpertModeChangeListener, ChangeListener {
     62   
    6263    /**
    6364     * Allows PreferenceSettings to do validation of entered values when ok was pressed.
     
    7879    }
    7980
    80     public static class PreferencePanel extends JPanel implements PreferenceTab {
     81    public static final class PreferencePanel extends JPanel implements PreferenceTab {
    8182        private final TabPreferenceSetting preferenceSetting;
    8283
     
    108109    }
    109110
    110     public static class PreferenceScrollPane extends JScrollPane implements PreferenceTab {
     111    public static final class PreferenceScrollPane extends JScrollPane implements PreferenceTab {
    111112        private final TabPreferenceSetting preferenceSetting;
    112113
  • trunk/src/org/openstreetmap/josm/gui/preferences/RemoteControlPreference.java

    r5861 r6362  
    3232 * @author Frederik Ramm
    3333 */
    34 public class RemoteControlPreference extends DefaultTabPreferenceSetting {
     34public final class RemoteControlPreference extends DefaultTabPreferenceSetting {
    3535
    3636    /**
  • trunk/src/org/openstreetmap/josm/gui/preferences/ServerAccessPreference.java

    r6342 r6362  
    1919import org.openstreetmap.josm.gui.widgets.VerticallyScrollablePanel;
    2020
    21 public class ServerAccessPreference extends DefaultTabPreferenceSetting {
     21public final class ServerAccessPreference extends DefaultTabPreferenceSetting {
    2222
    2323    public static class Factory implements PreferenceSettingFactory {
  • trunk/src/org/openstreetmap/josm/gui/preferences/ValidatorPreference.java

    r6084 r6362  
    2424 * @author frsantos
    2525 */
    26 public class ValidatorPreference extends DefaultTabPreferenceSetting {
     26public final class ValidatorPreference extends DefaultTabPreferenceSetting {
    2727
    2828    public static class Factory implements PreferenceSettingFactory {
  • trunk/src/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreference.java

    r6316 r6362  
    4848import org.openstreetmap.josm.tools.GBC;
    4949
    50 public class AdvancedPreference extends DefaultTabPreferenceSetting {
     50public final class AdvancedPreference extends DefaultTabPreferenceSetting {
    5151
    5252    public static class Factory implements PreferenceSettingFactory {
  • trunk/src/org/openstreetmap/josm/gui/preferences/display/DisplayPreference.java

    r6084 r6362  
    1212import org.openstreetmap.josm.tools.GBC;
    1313
    14 public class DisplayPreference extends DefaultTabPreferenceSetting {
     14public final class DisplayPreference extends DefaultTabPreferenceSetting {
    1515    public static class Factory implements PreferenceSettingFactory {
    1616        @Override
  • trunk/src/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreference.java

    r6361 r6362  
    6666import org.openstreetmap.josm.tools.LanguageInfo;
    6767
    68 public class ImageryPreference extends DefaultTabPreferenceSetting {
     68public final class ImageryPreference extends DefaultTabPreferenceSetting {
    6969    public static class Factory implements PreferenceSettingFactory {
    7070        @Override
  • trunk/src/org/openstreetmap/josm/gui/preferences/map/MapPreference.java

    r6084 r6362  
    1212import org.openstreetmap.josm.tools.GBC;
    1313
    14 public class MapPreference extends DefaultTabPreferenceSetting {
     14public final class MapPreference extends DefaultTabPreferenceSetting {
    1515    public static class Factory implements PreferenceSettingFactory {
    1616        @Override
  • trunk/src/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreference.java

    r6248 r6362  
    4646import org.xml.sax.SAXParseException;
    4747
    48 public class TaggingPresetPreference implements SubPreferenceSetting {
     48public final class TaggingPresetPreference implements SubPreferenceSetting {
    4949
    5050    public static class Factory implements PreferenceSettingFactory {
  • trunk/src/org/openstreetmap/josm/gui/preferences/shortcut/ShortcutPreference.java

    r6246 r6362  
    1616import org.openstreetmap.josm.tools.Shortcut;
    1717
    18 public class ShortcutPreference extends DefaultTabPreferenceSetting {
     18public final class ShortcutPreference extends DefaultTabPreferenceSetting {
    1919
    2020    private String defaultFilter;
  • trunk/src/org/openstreetmap/josm/gui/progress/NullProgressMonitor.java

    r6084 r6362  
    66import org.openstreetmap.josm.Main;
    77
    8 public class NullProgressMonitor implements ProgressMonitor {
     8public final class NullProgressMonitor implements ProgressMonitor {
    99
    1010    public static final ProgressMonitor INSTANCE = new NullProgressMonitor();
  • trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetSearchDialog.java

    r6323 r6362  
    1515 * @since 3388
    1616 */
    17 public class TaggingPresetSearchDialog extends ExtendedDialog {
     17public final class TaggingPresetSearchDialog extends ExtendedDialog {
    1818
    1919    private TaggingPresetSelector selector;
  • trunk/src/org/openstreetmap/josm/gui/util/GuiHelper.java

    r6248 r6362  
    3737 * basic gui utils
    3838 */
    39 public class GuiHelper {
     39public final class GuiHelper {
     40   
     41    private GuiHelper() {
     42        // Hide default constructor for utils classes
     43    }
     44   
    4045    /**
    4146     * disable / enable a component and all its child components
  • trunk/src/org/openstreetmap/josm/gui/util/TableHelper.java

    r5927 r6362  
    1010 * The class that provide common JTable customization methods
    1111 */
    12 public class TableHelper {
     12public final class TableHelper {
     13   
     14    private TableHelper() {
     15        // Hide default constructor for utils classes
     16    }
     17   
    1318    /**
    14     * (originally from @class org.openstreetmap.josm.gui.preferences.SourceEditor)
    15     * adjust the preferred width of column col to the maximum preferred width of the cells
    16     * requires JTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
    17     */
     19     * (originally from @class org.openstreetmap.josm.gui.preferences.SourceEditor)
     20     * adjust the preferred width of column col to the maximum preferred width of the cells
     21     * requires JTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
     22     */
    1823    public static void adjustColumnWidth(JTable tbl, int col, int maxColumnWidth) {
    1924        int maxwidth = 0;
     
    2631        tbl.getColumnModel().getColumn(col).setPreferredWidth(Math.min(maxwidth+10, maxColumnWidth));
    2732    }
    28    
    2933}
  • trunk/src/org/openstreetmap/josm/gui/widgets/AbstractTextComponentValidator.java

    r6101 r6362  
    1919import org.openstreetmap.josm.tools.CheckParameterUtil;
    2020import org.openstreetmap.josm.tools.Utils;
    21 import org.openstreetmap.josm.gui.widgets.JosmTextField;
    2221
    2322/**
  • trunk/src/org/openstreetmap/josm/io/AbstractParser.java

    r6201 r6362  
    137137                    id,version,visible,user,changesetId,timestamp
    138138            );
    139         }if (type.equals(OsmPrimitiveType.RELATION)) {
     139        } else if (type.equals(OsmPrimitiveType.RELATION)) {
    140140            primitive = new HistoryRelation(
    141141                    id,version,visible,user,changesetId,timestamp
  • trunk/src/org/openstreetmap/josm/io/OsmChangesetParser.java

    r4191 r6362  
    3838 *
    3939 */
    40 public class OsmChangesetParser {
     40public final class OsmChangesetParser {
    4141    private List<Changeset> changesets;
    4242
  • trunk/src/org/openstreetmap/josm/io/OsmServerChangesetReader.java

    r6104 r6362  
    1111import java.util.Collection;
    1212import java.util.Collections;
    13 import java.util.Iterator;
    1413import java.util.List;
    1514
  • trunk/src/org/openstreetmap/josm/io/OsmServerObjectReader.java

    r6223 r6362  
    44import static org.openstreetmap.josm.tools.I18n.tr;
    55
    6 import java.io.IOException;
    76import java.io.InputStream;
    87import java.text.MessageFormat;
     
    1615import org.openstreetmap.josm.tools.CheckParameterUtil;
    1716import org.openstreetmap.josm.tools.Utils;
    18 import org.xml.sax.SAXException;
    1917
    2018/**
     
    110108     * null
    111109     * @return the downloaded data
    112      * @throws SAXException
    113      * @throws IOException
     110     * @throws OsmTransferException
    114111     */
    115112    @Override
  • trunk/src/org/openstreetmap/josm/io/UTFInputStreamReader.java

    r6085 r6362  
    1111 * Detects the different UTF encodings from byte order mark
    1212 */
    13 public class UTFInputStreamReader extends InputStreamReader {
     13public final class UTFInputStreamReader extends InputStreamReader {
     14   
    1415    /**
    1516     * converts input stream to reader
  • trunk/src/org/openstreetmap/josm/io/auth/DefaultAuthenticator.java

    r6349 r6362  
    1515 *
    1616 */
    17 public class DefaultAuthenticator extends Authenticator {
     17public final class DefaultAuthenticator extends Authenticator {
    1818    private static DefaultAuthenticator instance;
    1919
  • trunk/src/org/openstreetmap/josm/io/remotecontrol/RequestProcessor.java

    r6332 r6362  
    396396        r.append(", \"parameters\" : [");
    397397
    398         String params[] = handler.getMandatoryParams();
     398        String[] params = handler.getMandatoryParams();
    399399        if (params != null) {
    400400            for (int i = 0; i < params.length; i++) {
     
    408408        }
    409409        r.append("], \"optional\" : [");
    410         String optional[] = handler.getOptionalParams();
     410        String[] optional = handler.getOptionalParams();
    411411        if (optional != null) {
    412412            for (int i = 0; i < optional.length; i++) {
     
    421421       
    422422        r.append("], \"examples\" : [");
    423         String examples[] = handler.getUsageExamples(cmd.substring(1));
     423        String[] examples = handler.getUsageExamples(cmd.substring(1));
    424424        if (examples != null) {
    425425            for (int i = 0; i < examples.length; i++) {
  • trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java

    r6360 r6362  
    7070 * @since 1326
    7171 */
    72 public class PluginHandler {
     72public final class PluginHandler {
    7373
    7474    /**
  • trunk/src/org/openstreetmap/josm/tools/AudioPlayer.java

    r6310 r6362  
    2222 * @since 547
    2323 */
    24 public class AudioPlayer extends Thread {
     24public final class AudioPlayer extends Thread {
    2525
    2626    private static AudioPlayer audioPlayer = null;
  • trunk/src/org/openstreetmap/josm/tools/AudioUtil.java

    r6070 r6362  
    1717 * @since 1462
    1818 */
    19 public class AudioUtil {
     19public final class AudioUtil {
    2020
     21    private AudioUtil() {
     22        // Hide default constructor for utils classes
     23    }
     24   
    2125    /**
    2226     * Returns calibrated length of recording in seconds.
  • trunk/src/org/openstreetmap/josm/tools/Base64.java

    r3840 r6362  
    44import java.nio.ByteBuffer;
    55
    6 public class Base64 {
     6public final class Base64 {
    77
     8    private Base64() {
     9        // Hide default constructor for utils classes
     10    }
     11   
    812    private static String encDefault = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
    913    private static String encUrlSafe = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
  • trunk/src/org/openstreetmap/josm/tools/CheckParameterUtil.java

    r5980 r6362  
    1212 * This utility class provides a collection of static helper methods for checking
    1313 * parameters at run-time.
    14  * @ince 2711
     14 * @since 2711
    1515 */
    16 public class CheckParameterUtil {
     16public final class CheckParameterUtil {
    1717
    18     private CheckParameterUtil(){}
     18    private CheckParameterUtil() {
     19        // Hide default constructor for utils classes
     20    }
    1921
    2022    /**
  • trunk/src/org/openstreetmap/josm/tools/ColorHelper.java

    r6360 r6362  
    77 * Helper to convert from color to html string and back
    88 */
    9 public class ColorHelper {
     9public final class ColorHelper {
    1010
    1111    private ColorHelper() {
  • trunk/src/org/openstreetmap/josm/tools/CopyList.java

    r6084 r6362  
    5656
    5757    // read-only access:
    58     public @Override E get(int index) {
     58    @Override
     59    public E get(int index) {
    5960        rangeCheck(index);
    6061        return array[index];
    6162    }
    6263
    63     public @Override int size() {
     64    @Override
     65    public int size() {
    6466        return size;
    6567    }
    6668
    6769    // modification:
    68     public @Override E set(int index, E element) {
     70    @Override
     71    public E set(int index, E element) {
    6972        rangeCheck(index);
    7073        changeCheck();
     
    7679
    7780    // full resizable semantics:
    78     public @Override void add(int index, E element) {
     81    @Override
     82    public void add(int index, E element) {
    7983        // range check
    8084        ensureCapacity(size+1);
     
    8690    }
    8791
    88     public @Override E remove(int index) {
     92    @Override
     93    public E remove(int index) {
    8994        rangeCheck(index);
    9095        changeCheck();
     
    102107
    103108    // speed optimizations:
    104     public @Override boolean add(E element) {
     109    @Override
     110    public boolean add(E element) {
    105111        ensureCapacity(size+1);
    106112        changeCheck();
     
    109115    }
    110116
    111     public @Override void clear() {
     117    @Override
     118    public void clear() {
    112119        modCount++;
    113120
     
    125132     * @return a clone of this <tt>CopyList</tt> instance
    126133     */
    127     public @Override Object clone() {
     134    @Override
     135    public Object clone() {
    128136        return new CopyList<E>(array, size);
    129137    }
  • trunk/src/org/openstreetmap/josm/tools/DateParser.java

    r2512 r6362  
    1010 * @author Immanuel.Scholz
    1111 */
    12 public class DateParser {
     12public final class DateParser {
     13   
     14    private DateParser() {
     15        // Hide default constructor for utils classes
     16    }
     17   
    1318    public static Date parse(String d) throws ParseException {
    1419        return new PrimaryDateParser().parse(d);
  • trunk/src/org/openstreetmap/josm/tools/ExceptionUtil.java

    r6248 r6362  
    3737
    3838@SuppressWarnings("CallToThreadDumpStack")
    39 public class ExceptionUtil {
     39public final class ExceptionUtil {
     40   
    4041    private ExceptionUtil() {
     42        // Hide default constructor for utils classes
    4143    }
    4244
  • trunk/src/org/openstreetmap/josm/tools/ExifReader.java

    r6360 r6362  
    2525 * @since 99
    2626 */
    27 public class ExifReader {
     27public final class ExifReader {
    2828
    2929    private ExifReader() {
  • trunk/src/org/openstreetmap/josm/tools/GBC.java

    r5275 r6362  
    1515 * @author imi
    1616 */
    17 public class GBC extends GridBagConstraints {
     17public final class GBC extends GridBagConstraints {
    1818
    1919    /**
  • trunk/src/org/openstreetmap/josm/tools/Geometry.java

    r6316 r6362  
    3030 * @author viesturs
    3131 */
    32 public class Geometry {
     32public final class Geometry {
     33   
     34    private Geometry() {
     35        // Hide default constructor for utils classes
     36    }
     37   
    3338    public enum PolygonIntersection {FIRST_INSIDE_SECOND, SECOND_INSIDE_FIRST, OUTSIDE, CROSSING}
    3439
  • trunk/src/org/openstreetmap/josm/tools/I18n.java

    r6360 r6362  
    3131 * @author Immanuel.Scholz
    3232 */
    33 public class I18n {
     33public final class I18n {
    3434   
    3535    private I18n() {
  • trunk/src/org/openstreetmap/josm/tools/InputMapUtils.java

    r6070 r6362  
    1616 *
    1717 */
    18 public class InputMapUtils {
    19       public static void unassignCtrlShiftUpDown(JComponent cmp, int condition) {
     18public final class InputMapUtils {
     19   
     20    private InputMapUtils() {
     21        // Hide default constructor for utils classes
     22    }
     23   
     24    public static void unassignCtrlShiftUpDown(JComponent cmp, int condition) {
    2025        InputMap inputMap=SwingUtilities.getUIInputMap(cmp, condition);
    2126        inputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_UP,InputEvent.CTRL_MASK|InputEvent.SHIFT_MASK));
     
    2429        inputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN,InputEvent.ALT_MASK|InputEvent.SHIFT_MASK));
    2530        SwingUtilities.replaceUIInputMap(cmp,JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT,inputMap);
    26       }
     31    }
    2732
    28 
    29       /**
    30        * Enable activating button on Enter (which is replaced with spacebar for certain Look-And-Feels)
    31        */
    32       public static void enableEnter(JButton b) {
     33    /**
     34     * Enable activating button on Enter (which is replaced with spacebar for certain Look-And-Feels)
     35     */
     36    public static void enableEnter(JButton b) {
    3337         b.setFocusable(true);
    3438         b.getInputMap(JComponent.WHEN_FOCUSED).put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "enter");
    3539         b.getActionMap().put("enter",b.getAction());
    36       }
     40    }
    3741
    38       public static void addEnterAction(JComponent c, Action a) {
     42    public static void addEnterAction(JComponent c, Action a) {
    3943         c.getActionMap().put("enter", a);
    4044         c.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "enter");
    41       }
     45    }
    4246
    43       public static void addSpacebarAction(JComponent c, Action a) {
     47    public static void addSpacebarAction(JComponent c, Action a) {
    4448         c.getActionMap().put("spacebar", a);
    4549         c.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_SPACE, 0), "spacebar");
    46       }
    47 
     50    }
    4851}
  • trunk/src/org/openstreetmap/josm/tools/LanguageInfo.java

    r6360 r6362  
    44import java.util.Locale;
    55
    6 public class LanguageInfo {
     6public final class LanguageInfo {
    77   
    88    private LanguageInfo() {
  • trunk/src/org/openstreetmap/josm/tools/MultikeyActionsHandler.java

    r6223 r6362  
    2727import org.openstreetmap.josm.tools.MultikeyShortcutAction.MultikeyInfo;
    2828
    29 public class MultikeyActionsHandler {
     29public final class MultikeyActionsHandler {
    3030
    3131    private static final long DIALOG_DELAY = 1000;
  • trunk/src/org/openstreetmap/josm/tools/OpenBrowser.java

    r6360 r6362  
    2020 * @author Imi
    2121 */
    22 public class OpenBrowser {
     22public final class OpenBrowser {
    2323
    2424    private OpenBrowser() {
  • trunk/src/org/openstreetmap/josm/tools/OsmUrlToBounds.java

    r6317 r6362  
    1313import org.openstreetmap.josm.data.coor.LatLon;
    1414
    15 public class OsmUrlToBounds {
     15public final class OsmUrlToBounds {
    1616    private static final String SHORTLINK_PREFIX = "http://osm.org/go/";
     17   
     18    private OsmUrlToBounds() {
     19        // Hide default constructor for utils classes
     20    }
    1721
    1822    public static Bounds parse(String url) {
  • trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java

    r6310 r6362  
    1212import java.io.InputStreamReader;
    1313import java.util.Arrays;
    14 import java.util.List;
    1514
    1615import org.openstreetmap.josm.Main;
  • trunk/src/org/openstreetmap/josm/tools/Shortcut.java

    r6316 r6362  
    3434 *
    3535 */
    36 public class Shortcut {
     36public final class Shortcut {
    3737    private String shortText;        // the unique ID of the shortcut
    3838    private String longText;         // a human readable description that will be shown in the preferences
  • trunk/src/org/openstreetmap/josm/tools/TaggingPresetNameTemplateList.java

    r6068 r6362  
    1515 * List of tagging presets with name templates, allows to find appropriate template based on existing primitive
    1616 */
    17 public class TaggingPresetNameTemplateList {
     17public final class TaggingPresetNameTemplateList {
    1818
    1919    private static TaggingPresetNameTemplateList instance;
  • trunk/src/org/openstreetmap/josm/tools/TextTagParser.java

    r6360 r6362  
    2727 * Class that helps to parse tags from arbitrary text
    2828 */
    29 public class TextTagParser {
     29public final class TextTagParser {
    3030   
    3131    // properties need JOSM restart to apply, modified rarely enough
  • trunk/src/org/openstreetmap/josm/tools/Utils.java

    r6360 r6362  
    4545 * Basic utils, that can be useful in different parts of the program.
    4646 */
    47 public class Utils {
     47public final class Utils {
    4848
    4949    private Utils() {
  • trunk/src/org/openstreetmap/josm/tools/template_engine/CompoundTemplateEntry.java

    r4282 r6362  
    33
    44
    5 public class CompoundTemplateEntry implements TemplateEntry {
     5public final class CompoundTemplateEntry implements TemplateEntry {
    66
    77    public static TemplateEntry fromArray(TemplateEntry... entry) {
Note: See TracChangeset for help on using the changeset viewer.