Changeset 10763 in josm


Ignore:
Timestamp:
2016-08-07T18:07:59+02:00 (8 years ago)
Author:
Don-vip
Message:

sonar - squid:S2156 - "final" classes should not have "protected" members

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

Legend:

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

    r10662 r10763  
    388388     * @return true if all ways can be joined into a polygon
    389389     */
    390     protected static boolean checkWaysArePolygon(Collection<Way> ways) {
     390    private static boolean checkWaysArePolygon(Collection<Way> ways) {
    391391        // For each way, nodes strictly between first and last should't be reference by an other way
    392392        for (Way way: ways) {
  • trunk/src/org/openstreetmap/josm/actions/CloseChangesetAction.java

    r10601 r10763  
    109109
    110110        /**
    111          * Fetch the user info from the server. This is necessary if we don't know
    112          * the users id yet
     111         * Fetch the user info from the server. This is necessary if we don't know the users id yet
    113112         *
    114113         * @return the user info
    115114         * @throws OsmTransferException in case of any communication exception
    116115         */
    117         protected UserInfo fetchUserInfo() throws OsmTransferException {
    118             OsmServerUserInfoReader reader = new OsmServerUserInfoReader();
    119             return reader.fetchUserInfo(getProgressMonitor().createSubTaskMonitor(1, false));
     116        private UserInfo fetchUserInfo() throws OsmTransferException {
     117            return new OsmServerUserInfoReader().fetchUserInfo(getProgressMonitor().createSubTaskMonitor(1, false));
    120118        }
    121119
  • trunk/src/org/openstreetmap/josm/corrector/ReverseWayNoTagCorrector.java

    r10716 r10763  
    7575    }
    7676
    77     protected static boolean confirmReverseWay(Way way, TagCollection tags) {
     77    private static boolean confirmReverseWay(Way way, TagCollection tags) {
    7878        String msg = trn(
    7979                // Singular, if a single tag is impacted
  • trunk/src/org/openstreetmap/josm/data/osm/ChangesetCache.java

    r10657 r10763  
    6868    }
    6969
    70     protected void fireChangesetCacheEvent(final ChangesetCacheEvent e) {
     70    private void fireChangesetCacheEvent(final ChangesetCacheEvent e) {
    7171        GuiHelper.runInEDT(() -> {
    7272            for (ChangesetCacheListener l: listeners) {
     
    7676    }
    7777
    78     protected void update(Changeset cs, DefaultChangesetCacheEvent e) {
     78    private void update(Changeset cs, DefaultChangesetCacheEvent e) {
    7979        if (cs == null) return;
    8080        if (cs.isNew()) return;
     
    123123    }
    124124
    125     protected void remove(int id, DefaultChangesetCacheEvent e) {
     125    private void remove(int id, DefaultChangesetCacheEvent e) {
    126126        if (id <= 0) return;
    127127        Changeset cs = cache.get(id);
  • trunk/src/org/openstreetmap/josm/data/osm/Node.java

    r10658 r10763  
    112112     * @param eastNorth east/north
    113113     */
    114     protected void setCoorInternal(LatLon coor, EastNorth eastNorth) {
     114    void setCoorInternal(LatLon coor, EastNorth eastNorth) {
    115115        if (coor != null) {
    116116            this.lat = coor.lat();
  • trunk/src/org/openstreetmap/josm/gui/bbox/TileSelectionBBoxChooser.java

    r10378 r10763  
    684684        }
    685685
    686         protected Point getTopLeftCoordinates() {
     686        private Point getTopLeftCoordinates() {
    687687            return new Point(center.x - (getWidth() / 2), center.y - (getHeight() / 2));
    688688        }
  • trunk/src/org/openstreetmap/josm/gui/dialogs/ChangesetDialog.java

    r10611 r10763  
    483483        }
    484484
    485         protected static void launchChangesetManager(Collection<Integer> toSelect) {
     485        private static void launchChangesetManager(Collection<Integer> toSelect) {
    486486            ChangesetCacheManager cm = ChangesetCacheManager.getInstance();
    487487            if (cm.isVisible()) {
  • trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictDialog.java

    r10611 r10763  
    116116     * builds the GUI
    117117     */
    118     protected void build() {
     118    private void build() {
    119119        model = new ConflictListModel();
    120120
  • trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java

    r10613 r10763  
    686686         * @see LayerListModelListener#makeVisible(int, Layer)
    687687         */
    688         protected void fireMakeVisible(int index, Layer layer) {
     688        private void fireMakeVisible(int index, Layer layer) {
    689689            for (LayerListModelListener listener : listeners) {
    690690                listener.makeVisible(index, layer);
     
    697697         * @see LayerListModelListener#refresh()
    698698         */
    699         protected void fireRefresh() {
     699        private void fireRefresh() {
    700700            for (LayerListModelListener listener : listeners) {
    701701                listener.refresh();
     
    892892         * Make sure the first of the selected layers is visible in the views of this model.
    893893         */
    894         protected void ensureSelectedIsVisible() {
     894        private void ensureSelectedIsVisible() {
    895895            int index = selectionModel.getMinSelectionIndex();
    896896            if (index < 0)
     
    941941         *
    942942         */
    943         protected void ensureActiveSelected() {
     943        private void ensureActiveSelected() {
    944944            List<Layer> layers = getLayers();
    945945            if (layers.isEmpty())
     
    963963         * @return the active layer. null, if no active layer is available
    964964         */
    965         protected Layer getActiveLayer() {
     965        private Layer getActiveLayer() {
    966966            return getLayerManager().getActiveLayer();
    967         }
    968 
    969         /**
    970          * Replies the scale layer. null, if no active layer is available.
    971          *
    972          * @return the scale layer. null, if no active layer is available
    973          * @deprecated Deprecated since it is unused in JOSM and does not really belong here. Can be removed soon (August 2016).
    974          *             You can directly query MapView.
    975          */
    976         @Deprecated
    977         protected NativeScaleLayer getNativeScaleLayer() {
    978             return Main.isDisplayingMapView() ? Main.map.mapView.getNativeScaleLayer() : null;
    979967        }
    980968
  • trunk/src/org/openstreetmap/josm/gui/dialogs/layer/LayerVisibilityAction.java

    r10611 r10763  
    8383    }
    8484
    85     protected void setVisibleFlag(boolean visible) {
     85    void setVisibleFlag(boolean visible) {
    8686        for (Layer l : model.getSelectedLayers()) {
    8787            l.setVisible(visible);
     
    102102    }
    103103
    104     protected void updateValues() {
     104    void updateValues() {
    105105        List<Layer> layers = model.getSelectedLayers();
    106106
  • trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserDialogManager.java

    r10657 r10763  
    6868    }
    6969
    70     protected void show(long id, HistoryBrowserDialog dialog) {
     70    private void show(long id, HistoryBrowserDialog dialog) {
    7171        if (dialogs.values().contains(dialog)) {
    7272            show(id);
     
    7878    }
    7979
    80     protected void show(long id) {
     80    private void show(long id) {
    8181        if (dialogs.keySet().contains(id)) {
    8282            dialogs.get(id).toFront();
     
    8484    }
    8585
    86     protected boolean hasDialogWithCloseUpperLeftCorner(Point p) {
     86    private boolean hasDialogWithCloseUpperLeftCorner(Point p) {
    8787        for (HistoryBrowserDialog dialog: dialogs.values()) {
    8888            Point corner = dialog.getLocation();
     
    9494    }
    9595
    96     protected void placeOnScreen(HistoryBrowserDialog dialog) {
     96    private void placeOnScreen(HistoryBrowserDialog dialog) {
    9797        WindowGeometry geometry = new WindowGeometry(WINDOW_GEOMETRY_PREF, WindowGeometry.centerOnScreen(new Dimension(850, 500)));
    9898        geometry.applySafe(dialog);
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java

    r10634 r10763  
    171171        }
    172172
    173         protected void rememberError(String message) {
     173        private void rememberError(String message) {
    174174            this.errorMessages.add(message);
    175175        }
     
    261261        }
    262262
    263         protected String formatErrorMessages() {
     263        private String formatErrorMessages() {
    264264            StringBuilder sb = new StringBuilder();
    265265            sb.append("<html>");
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageViewerDialog.java

    r10345 r10763  
    8484    }
    8585
    86     protected void build() {
     86    private void build() {
    8787        JPanel content = new JPanel(new BorderLayout());
    8888
  • trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceTabbedPane.java

    r10611 r10763  
    209209        }
    210210
    211         protected void buildPanel() {
     211        private void buildPanel() {
    212212            setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
    213213            add(new JLabel(preferenceSetting.getTitle()), GBC.eol().insets(0, 5, 0, 10).anchor(GBC.NORTHWEST));
  • trunk/src/org/openstreetmap/josm/gui/preferences/advanced/AbstractTableListEditor.java

    r9665 r10763  
    8686        }
    8787
    88         protected void updateEnabledState() {
     88        private void updateEnabledState() {
    8989            setEnabled(entryList.getSelectedIndices().length == 1);
    9090        }
  • trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginPreference.java

    r10611 r10763  
    160160    }
    161161
    162     protected JPanel buildSearchFieldPanel() {
     162    private JPanel buildSearchFieldPanel() {
    163163        JPanel pnl = new JPanel(new GridBagLayout());
    164164        pnl.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
     
    181181    }
    182182
    183     protected JPanel buildActionPanel() {
     183    private JPanel buildActionPanel() {
    184184        JPanel pnl = new JPanel(new GridLayout(1, 3));
    185185
     
    190190    }
    191191
    192     protected JPanel buildPluginListPanel() {
     192    private JPanel buildPluginListPanel() {
    193193        JPanel pnl = new JPanel(new BorderLayout());
    194194        pnl.add(buildSearchFieldPanel(), BorderLayout.NORTH);
     
    215215    }
    216216
    217     protected JTabbedPane buildContentPane() {
     217    private JTabbedPane buildContentPane() {
    218218        JTabbedPane pane = getTabPane();
    219219        pnlPluginUpdatePolicy = new PluginUpdatePolicyPanel();
  • trunk/src/org/openstreetmap/josm/gui/preferences/server/ServerAccessPreference.java

    r9625 r10763  
    4747     * @return panel with server preferences tabs
    4848     */
    49     protected JPanel buildTabbedServerPreferences() {
     49    private JPanel buildTabbedServerPreferences() {
    5050        JPanel pnl = new JPanel(new BorderLayout());
    5151        pnl.add(getTabPane(), BorderLayout.CENTER);
     
    5858     * @return preferences panel for server settings
    5959     */
    60     protected JPanel buildContentPanel() {
     60    private JPanel buildContentPanel() {
    6161        JPanel pnl = new JPanel(new GridBagLayout());
    6262        GridBagConstraints gc = new GridBagConstraints();
  • trunk/src/org/openstreetmap/josm/gui/widgets/QuadStateCheckBox.java

    r10680 r10763  
    169169        }
    170170
    171         protected void setPropertyText(String propertyText) {
     171        private void setPropertyText(String propertyText) {
    172172            this.propertyText = propertyText;
    173173        }
  • trunk/src/org/openstreetmap/josm/tools/TextTagParser.java

    r10604 r10763  
    151151    }
    152152
    153     protected static String unescape(String k) {
     153    static String unescape(String k) {
    154154        if (!(k.startsWith("\"") && k.endsWith("\""))) {
    155155            if (k.contains("=")) {
Note: See TracChangeset for help on using the changeset viewer.