Ignore:
Timestamp:
2016-08-07T14:46:57+02:00 (3 years ago)
Author:
Don-vip
Message:

sonar - various fixes

Location:
trunk/src/org/openstreetmap/josm/gui
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/MainApplication.java

    r10680 r10755  
    683683        }
    684684
    685         private boolean handleNetworkErrors() {
     685        private static boolean handleNetworkErrors() {
    686686            boolean condition = !NETWORK_ERRORS.isEmpty();
    687687            if (condition) {
  • trunk/src/org/openstreetmap/josm/gui/MapView.java

    r10742 r10755  
    267267    /**
    268268     * This class is an adapter for the old layer change interface.
    269      * <p>
    270      * New implementations should use {@link org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeListener}
    271269     * @author Michael Zangl
    272270     * @since 10271
    273      */
     271     * @deprecated New implementations should use {@link org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeListener}
     272     */
     273    @Deprecated
    274274    protected static class EditLayerChangeAdapter implements ActiveLayerChangeListener {
    275275
     
    326326     */
    327327    private static class WarningLayerPainter implements LayerPainter {
    328         boolean warningPrinted = false;
     328        boolean warningPrinted;
    329329        private final Layer layer;
    330330
  • trunk/src/org/openstreetmap/josm/gui/SideButton.java

    r10611 r10755  
    8585        if (action != null) {
    8686            propertyChangeListener = evt -> {
    87                 if (javax.swing.Action.SMALL_ICON.equals(evt.getPropertyName())) {
     87                if (Action.SMALL_ICON.equals(evt.getPropertyName())) {
    8888                    fixIcon(null);
    8989                }
  • trunk/src/org/openstreetmap/josm/gui/bbox/SlippyMapBBoxChooser.java

    r10627 r10755  
    173173    }
    174174
    175     private List<TileSource> getAllTileSources() {
     175    private static List<TileSource> getAllTileSources() {
    176176        List<TileSource> tileSources = new ArrayList<>();
    177177        for (TileSourceProvider provider: providers) {
  • trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java

    r10680 r10755  
    468468        public void performTagEdit() {
    469469            String value = Tag.removeWhiteSpaces(values.getEditor().getItem().toString());
    470             value = Normalizer.normalize(value, java.text.Normalizer.Form.NFC);
     470            value = Normalizer.normalize(value, Normalizer.Form.NFC);
    471471            if (value.isEmpty()) {
    472472                value = null; // delete the key
    473473            }
    474474            String newkey = Tag.removeWhiteSpaces(keys.getEditor().getItem().toString());
    475             newkey = Normalizer.normalize(newkey, java.text.Normalizer.Form.NFC);
     475            newkey = Normalizer.normalize(newkey, Normalizer.Form.NFC);
    476476            if (newkey.isEmpty()) {
    477477                newkey = key;
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTransferHandler.java

    r10604 r10755  
    5858    }
    5959
    60     private int computeInsertionRow(TransferSupport support, MemberTable destination) {
     60    private static int computeInsertionRow(TransferSupport support, MemberTable destination) {
    6161        final int insertRow;
    6262        if (support.isDrop()) {
  • trunk/src/org/openstreetmap/josm/gui/history/SelectionSynchronizer.java

    r10637 r10755  
    1313
    1414    private final Set<ListSelectionModel> participants;
    15     private boolean preventRecursion = false;
     15    private boolean preventRecursion;
    1616
    1717    /**
  • trunk/src/org/openstreetmap/josm/gui/history/TagInfoTransferHandler.java

    r10637 r10755  
    2323
    2424    @Override
    25     public void exportToClipboard(JComponent comp, Clipboard clip, int action) throws IllegalStateException {
     25    public void exportToClipboard(JComponent comp, Clipboard clip, int action) {
    2626        if (comp instanceof JTable) {
    2727            TableModel model = ((JTable) comp).getModel();
  • trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java

    r10611 r10755  
    177177
    178178        info.append(tr("Length: {0}", SystemOfMeasurement.getSystemOfMeasurement().getDistText(data.length()))).append("<br>")
    179             .append(trn("{0} route, ", "{0} routes, ", data.routes.size(), data.routes.size())).append(
    180                 trn("{0} waypoint", "{0} waypoints", data.waypoints.size(), data.waypoints.size())).append("<br>")
    181             .append("</html>");
     179            .append(trn("{0} route, ", "{0} routes, ", data.routes.size(), data.routes.size()))
     180            .append(trn("{0} waypoint", "{0} waypoints", data.waypoints.size(), data.waypoints.size())).append("<br></html>");
    182181
    183182        final JScrollPane sp = new JScrollPane(new HtmlPanel(info.toString()));
  • trunk/src/org/openstreetmap/josm/gui/layer/gpx/ChooseTrackVisibilityAction.java

    r10680 r10755  
    128128     * @return non-editable table
    129129     */
    130     private JTable buildTable(Object[]... content) {
     130    private static JTable buildTable(Object[]... content) {
    131131        final String[] headers = {tr("Name"), tr("Description"), tr("Timespan"), tr("Length"), tr("URL")};
    132132        DefaultTableModel model = new DefaultTableModel(content, headers);
  • trunk/src/org/openstreetmap/josm/gui/layer/imagery/SharpenImageProcessor.java

    r10547 r10755  
    6868    }
    6969
    70     private ConvolveOp generateMixed(float aFactor, float[] a, float[] b) {
     70    private static ConvolveOp generateMixed(float aFactor, float[] a, float[] b) {
    7171        if (a.length != 9 || b.length != 9) {
    7272            throw new IllegalArgumentException("Illegal kernel array length.");
  • trunk/src/org/openstreetmap/josm/gui/widgets/ButtonColumn.java

    r10547 r10755  
    2929    private final JButton editButton;
    3030    private Object editorValue;
    31     private String buttonName = null;
     31    private String buttonName;
    3232
    3333    /**
Note: See TracChangeset for help on using the changeset viewer.