Ignore:
Timestamp:
2014-01-04T06:39:00+01:00 (10 years ago)
Author:
Don-vip
Message:

fix Sonar issues

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginPreference.java

    r6603 r6623  
    1313import java.awt.event.ComponentAdapter;
    1414import java.awt.event.ComponentEvent;
     15import java.lang.reflect.InvocationTargetException;
    1516import java.util.ArrayList;
    1617import java.util.Collection;
     
    138139        gc.gridx = 1;
    139140        gc.weightx = 1.0;
    140         pnl.add(tfFilter = new JosmTextField(), gc);
     141        tfFilter = new JosmTextField();
     142        pnl.add(tfFilter, gc);
    141143        tfFilter.setToolTipText(tr("Enter a search expression"));
    142144        SelectAllOnFocusGainedDecorator.decorate(tfFilter);
     
    158160        pnl.add(buildSearchFieldPanel(), BorderLayout.NORTH);
    159161        model  = new PluginPreferencesModel();
    160         spPluginPreferences = new JScrollPane(pnlPluginPreferences = new PluginListPanel(model));
     162        pnlPluginPreferences = new PluginListPanel(model);
     163        spPluginPreferences = new JScrollPane(pnlPluginPreferences);
    161164        spPluginPreferences.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
    162165        spPluginPreferences.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
     
    181184    protected JTabbedPane buildContentPane() {
    182185        JTabbedPane pane = getTabPane();
     186        pnlPluginUpdatePolicy = new PluginUpdatePolicyPanel();
    183187        pane.addTab(tr("Plugins"), buildPluginListPanel());
    184         pane.addTab(tr("Plugin update policy"), pnlPluginUpdatePolicy = new PluginUpdatePolicyPanel());
     188        pane.addTab(tr("Plugin update policy"), pnlPluginUpdatePolicy);
    185189        return pane;
    186190    }
     
    363367                    }
    364368                });
    365             } catch (Exception e) {
    366                 e.printStackTrace();
     369            } catch (InterruptedException e) {
     370                Main.error(e);
     371            } catch (InvocationTargetException e) {
     372                Main.error(e);
    367373            }
    368374        }
     
    482488        private DefaultListModel model;
    483489
    484         protected void build() {
     490        protected final void build() {
    485491            setLayout(new GridBagLayout());
    486492            add(new JLabel(tr("Add JOSM Plugin description URL.")), GBC.eol());
Note: See TracChangeset for help on using the changeset viewer.