Ignore:
Timestamp:
2015-06-06T01:48:41+02:00 (9 years ago)
Author:
Don-vip
Message:

fix some minor sonar/code style issues:

  • Avoid Protected Field In Final Class
  • Class defines fields that are used only as locals
File:
1 edited

Legend:

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

    r8443 r8468  
    3636
    3737    /** (preference key => return value) mappings valid for the current operation (no, those two maps cannot be combined) */
    38     protected static final Map<String, Integer> sessionChoices = new HashMap<>();
     38    private static final Map<String, Integer> sessionChoices = new HashMap<>();
    3939    /** (preference key =&gt; return value) mappings valid for the current session */
    40     protected static final Map<String, Integer> immediateChoices = new HashMap<>();
     40    private static final Map<String, Integer> immediateChoices = new HashMap<>();
    4141    /** a set indication that (preference key) is or may be stored for the currently active bulk operation */
    42     protected static final Set<String> immediateActive = new HashSet<>();
     42    private static final Set<String> immediateActive = new HashSet<>();
    4343
    4444    /**
     
    243243
    244244    /**
    245      * This is a message panel used in dialogs which can be enabled/disabled with a preference
    246      * setting.
     245     * This is a message panel used in dialogs which can be enabled/disabled with a preference setting.
    247246     * In addition to the normal message any {@link JOptionPane} would display it includes
    248247     * a checkbox for enabling/disabling this particular dialog.
     
    250249     */
    251250    static class MessagePanel extends JPanel {
    252         private final ButtonGroup group = new ButtonGroup();
    253251        private final JRadioButton cbShowPermanentDialog = new JRadioButton(NotShowAgain.PERMANENT.getLabel());
    254252        private final JRadioButton cbShowSessionDialog = new JRadioButton(NotShowAgain.SESSION.getLabel());
     
    258256        /**
    259257         * Constructs a new panel.
    260          * @param message the the message (null to add no message, Component instances are added directly, otherwise a JLabel with the string representation is added)
     258         * @param message the the message (null to add no message, Component instances are added directly,
     259         *                otherwise a JLabel with the string representation is added)
    261260         * @param displayImmediateOption whether to provide "Do not show again (this session)"
    262261         */
    263262        public MessagePanel(Object message, boolean displayImmediateOption) {
    264263            cbStandard.setSelected(true);
     264            ButtonGroup group = new ButtonGroup();
    265265            group.add(cbShowPermanentDialog);
    266266            group.add(cbShowSessionDialog);
Note: See TracChangeset for help on using the changeset viewer.