Ignore:
Timestamp:
2010-02-15T09:03:57+01:00 (14 years ago)
Author:
jttt
Message:

Fix some eclipse warnings

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

Legend:

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

    r2702 r2990  
    785785         * @since 1.1
    786786         */
    787         public TransferableObject( Class dataClass, Fetcher fetcher )
     787        public TransferableObject(Class<?> dataClass, Fetcher fetcher )
    788788        {   this.fetcher = fetcher;
    789789        this.customFlavor = new java.awt.datatransfer.DataFlavor( dataClass, MIME_TYPE );
  • trunk/src/org/openstreetmap/josm/gui/JosmUserIdentityManager.java

    r2850 r2990  
    4646
    4747    /**
    48      * Replies the unique instance of teh JOSM user identity manager
    49      *
    50      * @return the unique instance of teh JOSM user identity manager
     48     * Replies the unique instance of the JOSM user identity manager
     49     *
     50     * @return the unique instance of the JOSM user identity manager
    5151     */
    5252    static public JosmUserIdentityManager getInstance() {
  • trunk/src/org/openstreetmap/josm/gui/PleaseWaitRunnable.java

    r2980 r2990  
    2424 */
    2525public abstract class PleaseWaitRunnable implements Runnable, CancelListener {
     26    @SuppressWarnings("unused")
    2627    private final static Logger logger = Logger.getLogger(PleaseWaitRunnable.class.getName());
    2728
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListTableCellRenderer.java

    r2846 r2990  
    11// License: GPL. For details, see LICENSE file.
    22package org.openstreetmap.josm.gui.conflict.pair.nodes;
    3 
    4 import static org.openstreetmap.josm.tools.I18n.tr;
    53
    64import java.awt.Color;
     
    167165        reset();
    168166        switch(column) {
    169             case 0:
    170                 renderRowId(getModel(table),row, isSelected);
    171                 break;
    172             case 1:
    173                 if (node == null) {
    174                     renderEmptyRow();
    175                 } else {
    176                     renderNode(getModel(table), node, row, isSelected);
    177                 }
    178                 break;
    179             default:
    180                 // should not happen
    181                 throw new RuntimeException(MessageFormat.format("Unexpected column index. Got {0}.", column));
     167        case 0:
     168            renderRowId(getModel(table),row, isSelected);
     169            break;
     170        case 1:
     171            if (node == null) {
     172                renderEmptyRow();
     173            } else {
     174                renderNode(getModel(table), node, row, isSelected);
     175            }
     176            break;
     177        default:
     178            // should not happen
     179            throw new RuntimeException(MessageFormat.format("Unexpected column index. Got {0}.", column));
    182180        }
    183181        return this;
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberTableCellRenderer.java

    r2512 r2990  
    44import java.awt.Color;
    55import java.awt.Component;
    6 import java.text.DecimalFormat;
    76import java.util.ArrayList;
    87import java.util.Collections;
     
    2726 */
    2827public  class RelationMemberTableCellRenderer extends JLabel implements TableCellRenderer {
    29     private final static DecimalFormat COORD_FORMATTER = new DecimalFormat("###0.0000");
    3028    public final static Color BGCOLOR_SELECTED = new Color(143,170,255);
    3129    public final static Color BGCOLOR_EMPTY_ROW = new Color(234,234,234);
     
    194192        renderForeground(getModel(table), member, row, column, isSelected);
    195193        switch(column) {
    196             case 0:
    197                 renderRowId(row);
    198                 break;
    199             case 1:
    200                 if (member == null) {
    201                     renderEmptyRow();
    202                 } else {
    203                     renderRole(member);
    204                 }
    205                 break;
    206             case 2:
    207                 if (member == null) {
    208                     renderEmptyRow();
    209                 } else {
    210                     renderPrimitive(member);
    211                 }
    212                 break;
    213             default:
    214                 // should not happen
     194        case 0:
     195            renderRowId(row);
     196            break;
     197        case 1:
     198            if (member == null) {
     199                renderEmptyRow();
     200            } else {
     201                renderRole(member);
     202            }
     203            break;
     204        case 2:
     205            if (member == null) {
     206                renderEmptyRow();
     207            } else {
     208                renderPrimitive(member);
     209            }
     210            break;
     211        default:
     212            // should not happen
    215213        }
    216214        return this;
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergeTableCellRenderer.java

    r2846 r2990  
    11// License: GPL. For details, see LICENSE file.
    22package org.openstreetmap.josm.gui.conflict.pair.tags;
    3 
    4 import static org.openstreetmap.josm.tools.I18n.tr;
    53
    64import java.awt.Color;
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/MultiValueResolutionDecision.java

    r2846 r2990  
    88import java.util.Collection;
    99import java.util.Collections;
    10 import java.util.Iterator;
    1110import java.util.List;
    1211
     
    134133    public String getChosenValue() throws IllegalStateException {
    135134        switch(type) {
    136             case UNDECIDED: throw new IllegalStateException(tr("Not decided yet."));
    137             case KEEP_ONE: return value;
    138             case KEEP_NONE: return null;
    139             case KEEP_ALL: return tags.getJoinedValues(getKey());
     135        case UNDECIDED: throw new IllegalStateException(tr("Not decided yet."));
     136        case KEEP_ONE: return value;
     137        case KEEP_NONE: return null;
     138        case KEEP_ALL: return tags.getJoinedValues(getKey());
    140139        }
    141140        // should not happen
     
    282281    public Tag getResolution() {
    283282        switch(type) {
    284             case KEEP_ALL: return new Tag(getKey(), tags.getJoinedValues(getKey()));
    285             case KEEP_ONE: return new Tag(getKey(),value);
    286             case KEEP_NONE: return new Tag(getKey(), "");
    287             case UNDECIDED: return null;
     283        case KEEP_ALL: return new Tag(getKey(), tags.getJoinedValues(getKey()));
     284        case KEEP_ONE: return new Tag(getKey(),value);
     285        case KEEP_NONE: return new Tag(getKey(), "");
     286        case UNDECIDED: return null;
    288287        }
    289288        return null;
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/PasteTagsConflictResolverDialog.java

    r2512 r2990  
    433433
    434434    static private class StatisticsInfoRenderer extends JLabel implements TableCellRenderer {
     435        @SuppressWarnings("unused")
    435436        static private final Logger logger = Logger.getLogger(StatisticsInfoRenderer.class.getName());
    436437
     
    461462                String msg = "";
    462463                switch(type) {
    463                     case NODE: msg = trn("{0} node", "{0} nodes", numPrimitives,numPrimitives); break;
    464                     case WAY: msg = trn("{0} way", "{0} ways", numPrimitives, numPrimitives); break;
    465                     case RELATION: msg = trn("{0} relation", "{0} relations", numPrimitives, numPrimitives); break;
     464                case NODE: msg = trn("{0} node", "{0} nodes", numPrimitives,numPrimitives); break;
     465                case WAY: msg = trn("{0} way", "{0} ways", numPrimitives, numPrimitives); break;
     466                case RELATION: msg = trn("{0} relation", "{0} relations", numPrimitives, numPrimitives); break;
    466467                }
    467468                text = text.equals("") ? msg : text + ", " + msg;
     
    488489
    489490                switch(column) {
    490                     case 0: renderNumTags(info); break;
    491                     case 1: renderFrom(info); break;
    492                     case 2: renderTo(info); break;
     491                case 0: renderNumTags(info); break;
     492                case 1: renderFrom(info); break;
     493                case 2: renderTo(info); break;
    493494                }
    494495            }
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictDecisionType.java

    r2512 r2990  
    44import static org.openstreetmap.josm.tools.I18n.tr;
    55
    6 import javax.swing.DefaultComboBoxModel;
    7 import javax.swing.JComboBox;
    86import javax.swing.JLabel;
    97
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolverModel.java

    r2846 r2990  
    11// License: GPL. For details, see LICENSE file.
    22package org.openstreetmap.josm.gui.conflict.tags;
    3 
    4 import static org.openstreetmap.josm.tools.I18n.tr;
    53
    64import java.beans.PropertyChangeListener;
  • trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetContentTableModel.java

    r2711 r2990  
    136136     */
    137137    static private class ChangesetContentEntry implements ChangesetDataSetEntry{
    138         private ChangesetModificationType modificationType;
    139         private HistoryOsmPrimitive primitive;
     138        private final ChangesetModificationType modificationType;
     139        private final HistoryOsmPrimitive primitive;
    140140
    141141        public ChangesetContentEntry(ChangesetModificationType modificationType, HistoryOsmPrimitive primitive) {
     
    145145
    146146        public ChangesetContentEntry(ChangesetDataSetEntry entry) {
    147             this.modificationType = entry.getModificationType();
    148             this.primitive = entry.getPrimitive();
     147            this(entry.getModificationType(), entry.getPrimitive());
    149148        }
    150149
     
    152151            return modificationType;
    153152        }
    154         public void setModificationType(ChangesetModificationType modificationType) {
    155             this.modificationType = modificationType;
    156         }
    157153        public HistoryOsmPrimitive getPrimitive() {
    158154            return primitive;
    159155        }
    160         public void setPrimitive(HistoryOsmPrimitive primitive) {
    161             this.primitive = primitive;
    162         }
    163156    }
    164157}
  • trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/AdvancedChangesetQueryPanel.java

    r2847 r2990  
    10861086
    10871087        public Date getDate() {
    1088             for (int i = 0; i< 4; i++) {
     1088            for (int format: new int[] {DateFormat.SHORT, DateFormat.MEDIUM, DateFormat.LONG, DateFormat.FULL}) {
     1089                DateFormat df = DateFormat.getDateInstance(format);
    10891090                try {
    1090                     DateFormat df = null;
    1091                     switch(i) {
    1092                     case 0: df = DateFormat.getDateInstance(DateFormat.SHORT, Locale.getDefault()); break;
    1093                     case 1: df = DateFormat.getDateInstance(DateFormat.MEDIUM, Locale.getDefault()); break;
    1094                     case 2: df = DateFormat.getDateInstance(DateFormat.LONG, Locale.getDefault()); break;
    1095                     case 3: df = DateFormat.getDateInstance(DateFormat.FULL,Locale.getDefault()); break;
    1096                     }
    10971091                    return df.parse(getComponent().getText());
    1098                 } catch(ParseException e) {
    1099                     continue;
     1092                } catch (ParseException e) {
     1093                    // Try next format
    11001094                }
    11011095            }
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java

    r2986 r2990  
    7777 */
    7878public class GenericRelationEditor extends RelationEditor  {
     79    @SuppressWarnings("unused")
    7980    static private final Logger logger = Logger.getLogger(GenericRelationEditor.class.getName());
    8081
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberRoleCellEditor.java

    r2512 r2990  
    1515
    1616public class MemberRoleCellEditor extends AbstractCellEditor implements TableCellEditor {
    17 
    18     /** the logger object */
     17    @SuppressWarnings("unused")
    1918    static private Logger logger = Logger.getLogger(MemberRoleCellEditor.class.getName());
    2019
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableLinkedCellRenderer.java

    r2512 r2990  
    11// License: GPL. For details, see LICENSE file.
    22package org.openstreetmap.josm.gui.dialogs.relation;
    3 
    4 import static org.openstreetmap.josm.tools.I18n.tr;
    53
    64import java.awt.Color;
     
    119import javax.swing.JTable;
    1210
     11import org.openstreetmap.josm.gui.dialogs.relation.WayConnectionType.Direction;
    1312import org.openstreetmap.josm.tools.ImageProvider;
    14 import org.openstreetmap.josm.gui.dialogs.relation.WayConnectionType.Direction;
    1513
    1614public class MemberTableLinkedCellRenderer extends MemberTableCellRenderer {
     
    3836    public void paintComponent(Graphics g) {
    3937        super.paintComponent(g);
    40         if (value == null || !value.isValid()) {
     38        if (value == null || !value.isValid())
    4139            return;
    42         }
    4340
    4441        int ymax=this.getSize().height - 1;
     
    10299        Image arrow = null;
    103100        switch (value.direction) {
    104             case FORWARD:
    105                 arrow = arrowDown;
    106                 break;
    107             case BACKWARD:
    108                 arrow = arrowUp;
    109                 break;
     101        case FORWARD:
     102            arrow = arrowDown;
     103            break;
     104        case BACKWARD:
     105            arrow = arrowUp;
     106            break;
    110107        }
    111108        if ((arrow != null) && (value.linkPrev || value.linkNext)) {
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationTree.java

    r2847 r2990  
    3535 */
    3636public class RelationTree extends JTree {
     37    @SuppressWarnings("unused")
    3738    static private final Logger logger = Logger.getLogger(RelationTree.class.getName());
    3839
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/WayConnectionType.java

    r2512 r2990  
    22package org.openstreetmap.josm.gui.dialogs.relation;
    33
     4import static org.openstreetmap.josm.gui.dialogs.relation.WayConnectionType.Direction.NONE;
    45import static org.openstreetmap.josm.tools.I18n.tr;
    5 
    6 import static org.openstreetmap.josm.gui.dialogs.relation.WayConnectionType.Direction.*;
    76
    87public class WayConnectionType {
     
    3231            return this == ROUNDABOUT_RIGHT || this == ROUNDABOUT_LEFT;
    3332        }
    34     };
     33    }
    3534
    3635    /** True, if the element is part of a closed loop of ways. */
     
    6665
    6766    public String getToolTip() {
    68         if (!isValid()) {
     67        if (!isValid())
    6968            return "";
    70         }
    71         else if (linkPrev && linkNext) {
     69        else if (linkPrev && linkNext)
    7270            return tr("way is connected");
    73         }
    74         else if (linkPrev) {
     71        else if (linkPrev)
    7572            return tr("way is connected to previous relation member");
    76         }
    77         else if (linkNext) {
     73        else if (linkNext)
    7874            return tr("way is connected to next relation member");
    79         }
    80         else {
     75        else
    8176            return tr("way is not connected to previous or next relation member");
    82         }//FIXME: isLoop & direction
    8377    }
    8478}
  • trunk/src/org/openstreetmap/josm/gui/download/DownloadDialog.java

    r2824 r2990  
    5151 */
    5252public class DownloadDialog extends JDialog  {
     53    @SuppressWarnings("unused")
    5354    static private final Logger logger = Logger.getLogger(DownloadDialog.class.getName());
    5455
  • trunk/src/org/openstreetmap/josm/gui/history/CoordinateInfoViewer.java

    r2850 r2990  
    44
    55import java.awt.Color;
    6 import java.awt.Graphics;
    7 import java.awt.Graphics2D;
    86import java.awt.GridBagConstraints;
    97import java.awt.GridBagLayout;
  • trunk/src/org/openstreetmap/josm/gui/history/TagTableCellRenderer.java

    r2512 r2990  
    1919 */
    2020public class TagTableCellRenderer extends JLabel implements TableCellRenderer {
    21 
     21    @SuppressWarnings("unused")
    2222    static private Logger logger = Logger.getLogger(TagTableCellRenderer.class.getName());
    2323
  • trunk/src/org/openstreetmap/josm/gui/history/VersionInfoPanel.java

    r2850 r2990  
    3232 */
    3333public class VersionInfoPanel extends JPanel implements Observer{
     34    @SuppressWarnings("unused")
    3435    static private final Logger logger = Logger.getLogger(VersionInfoPanel.class.getName());
    3536
  • trunk/src/org/openstreetmap/josm/gui/history/VersionTableCellRenderer.java

    r2959 r2990  
    2828public class VersionTableCellRenderer extends JLabel implements TableCellRenderer {
    2929
     30    @SuppressWarnings("unused")
    3031    static private Logger logger = Logger.getLogger(VersionTableCellRenderer.class.getName());
    3132
  • trunk/src/org/openstreetmap/josm/gui/io/DownloadOpenChangesetsTask.java

    r2915 r2990  
    6666                            + "to know the identity of the user on whose behalf you are working.")
    6767                            + "</html>",
    68                     tr("Missing user identity"),
    69                     JOptionPane.ERROR_MESSAGE
     68                            tr("Missing user identity"),
     69                            JOptionPane.ERROR_MESSAGE
    7070            );
    7171            return;
     
    100100     */
    101101    protected void refreshUserIdentity(){
    102         JosmUserIdentityManager im = null;
     102        JosmUserIdentityManager im = JosmUserIdentityManager.getInstance();
    103103        try {
    104             im = JosmUserIdentityManager.getInstance();
    105104            OsmServerUserInfoReader reader = new OsmServerUserInfoReader();
    106105            UserInfo info = reader.fetchUserInfo(getProgressMonitor().createSubTaskMonitor(1, false));
  • trunk/src/org/openstreetmap/josm/gui/io/SaveLayerInfo.java

    r2848 r2990  
    66import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    77import org.openstreetmap.josm.tools.CheckParameterUtil;
    8 
    9 import static org.openstreetmap.josm.tools.I18n.tr;
    108
    119/**
  • trunk/src/org/openstreetmap/josm/gui/io/UpdatePrimitivesTask.java

    r2801 r2990  
    3434 */
    3535public class UpdatePrimitivesTask extends PleaseWaitRunnable {
     36    @SuppressWarnings("unused")
    3637    static private final Logger logger = Logger.getLogger(UpdatePrimitivesTask.class.getName());
    3738
  • trunk/src/org/openstreetmap/josm/gui/io/UploadParameterSummaryPanel.java

    r2915 r2990  
    2727
    2828public class UploadParameterSummaryPanel extends JPanel implements HyperlinkListener, PropertyChangeListener{
    29 
     29    @SuppressWarnings("unused")
    3030    static private final Logger logger = Logger.getLogger(UploadParameterSummaryPanel.class.getName());
    3131
  • trunk/src/org/openstreetmap/josm/gui/io/UploadPrimitivesTask.java

    r2915 r2990  
    3939 */
    4040public class UploadPrimitivesTask extends  AbstractUploadTask {
     41    @SuppressWarnings("unused")
    4142    static private final Logger logger = Logger.getLogger(UploadPrimitivesTask.class.getName());
    4243
  • trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java

    r2941 r2990  
    257257
    258258                    File sel[] = fc.getSelectedFiles();
    259                     if (sel != null) {
    260                         // sort files in increasing order of timestamp (this is the end time, but so
    261                         // long as they don't overlap, that's fine)
    262                         if (sel.length > 1) {
    263                             Arrays.sort(sel, new Comparator<File>() {
    264                                 public int compare(File a, File b) {
    265                                     return a.lastModified() <= b.lastModified() ? -1 : 1;
    266                                 }
    267                             });
    268                         }
     259                    // sort files in increasing order of timestamp (this is the end time, but so
     260                    // long as they don't overlap, that's fine)
     261                    if (sel.length > 1) {
     262                        Arrays.sort(sel, new Comparator<File>() {
     263                            public int compare(File a, File b) {
     264                                return a.lastModified() <= b.lastModified() ? -1 : 1;
     265                            }
     266                        });
    269267                    }
    270268
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java

    r2969 r2990  
    4141import javax.swing.JSeparator;
    4242import javax.swing.SwingConstants;
    43 import javax.swing.SwingUtilities;
    4443
    4544import org.openstreetmap.josm.Main;
     
    236235                Main.main.addLayer(layer);
    237236                layer.hook_up_mouse_events(); // Main.map.mapView should exist
    238                                               // now. Can add mouse listener
     237                // now. Can add mouse listener
    239238                Main.map.mapView.addPropertyChangeListener(layer);
    240239                if (Main.map.getToggleDialog(ImageViewerDialog.class) == null) {
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageDisplay.java

    r2986 r2990  
    8383
    8484            boolean error = tracker.isErrorID(1);
    85             if (img != null && (img.getWidth(null) == 0 || img.getHeight(null) == 0)) {
     85            if (img.getWidth(null) == 0 || img.getHeight(null) == 0) {
    8686                error = true;
    8787            }
     
    439439            g.setColor(Color.black);
    440440            String loadingStr;
    441             if (! errorLoading) {;
    442             loadingStr = tr("Loading {0}", file.getName());
     441            if (! errorLoading) {
     442                loadingStr = tr("Loading {0}", file.getName());
    443443            } else {
    444444                loadingStr = tr("Error on file {0}", file.getName());
  • trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java

    r2889 r2990  
    44
    55import java.io.File;
     6import java.io.IOException;
    67import java.io.InputStream;
    7 import java.io.IOException;
    88import java.util.Collection;
    99import java.util.Collections;
     
    5858    }
    5959
     60    @SuppressWarnings("null")
    6061    public static void readFromPreferences() {
    6162        iconDirs = Main.pref.getCollection("mappaint.icon.sources", Collections.<String>emptySet());
     
    9596                    zipIcons = in.getFile();
    9697                    xmlReader.parse(new InputSource(zip));
     98                } else {
     99                    xmlReader.parse(new InputSource(in));
    97100                }
    98                 else
    99                     xmlReader.parse(new InputSource(in));
    100101            } catch(IOException e) {
    101102                System.err.println(tr("Warning: failed to load Mappaint styles from ''{0}''. Exception was: {1}", a[1], e.toString()));
  • trunk/src/org/openstreetmap/josm/gui/oauth/FullyAutomaticAuthorizationUI.java

    r2927 r2990  
    224224     */
    225225    protected JPanel buildResultsPanel() {
    226         JPanel pnl = new JPanel(new GridBagLayout());;
     226        JPanel pnl = new JPanel(new GridBagLayout());
    227227        GridBagConstraints gc = new GridBagConstraints();
    228228        pnl.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
  • trunk/src/org/openstreetmap/josm/gui/oauth/OAuthAuthorizationWizard.java

    r2877 r2990  
    5252 */
    5353public class OAuthAuthorizationWizard extends JDialog {
     54    @SuppressWarnings("unused")
    5455    static private final Logger logger = Logger.getLogger(OAuthAuthorizationWizard.class.getName());
    5556
  • trunk/src/org/openstreetmap/josm/gui/oauth/OsmOAuthAuthorizationClient.java

    r2877 r2990  
    3636
    3737public class OsmOAuthAuthorizationClient {
     38    @SuppressWarnings("unused")
    3839    static private final Logger logger = Logger.getLogger(OsmOAuthAuthorizationClient.class.getName());
    3940
  • trunk/src/org/openstreetmap/josm/gui/preferences/PluginPreference.java

    r2955 r2990  
    5353
    5454public class PluginPreference implements PreferenceSetting {
     55    @SuppressWarnings("unused")
    5556    private final static Logger logger = Logger.getLogger(PluginPreference.class.getName());
    5657
     
    297298                    }
    298299                });
    299             };
     300            }
    300301        };
    301302        Main.worker.submit(task);
  • trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceTabbedPane.java

    r2817 r2990  
    4040 */
    4141public class PreferenceTabbedPane extends JTabbedPane implements MouseWheelListener {
     42    @SuppressWarnings("unused")
    4243    static private final Logger logger = Logger.getLogger(PreferenceTabbedPane.class.getName());
    4344
  • trunk/src/org/openstreetmap/josm/gui/preferences/ProjectionPreference.java

    r2745 r2990  
    77import java.awt.event.ActionEvent;
    88import java.awt.event.ActionListener;
    9 
    109import java.util.Collection;
    1110
     
    110109        String projname = proj.getClass().getName();
    111110        Collection<String> prefs = null;
    112         if(projHasPrefs(proj))
     111        if(projHasPrefs(proj)) {
    113112            prefs = ((ProjectionSubPrefs) proj).getPreferences(projSubPrefPanel);
     113        }
    114114
    115115        Main.pref.put("projection", projname);
     
    143143    {
    144144        setProjection(Main.pref.get("projection", Mercator.class.getName()),
    145         Main.pref.getCollection("projection.sub", null));
     145                Main.pref.getCollection("projection.sub", null));
    146146    }
    147147
     
    167167        String sname = name.substring(name.lastIndexOf(".")+1);
    168168        Main.pref.putCollection("projection.sub."+sname, coll);
    169         if(projHasPrefs(Main.proj))
     169        if(projHasPrefs(Main.proj)) {
    170170            ((ProjectionSubPrefs) Main.proj).setPreferences(coll);
     171        }
    171172        if(b != null && (!Main.proj.getClass().getName().equals(oldProj.getClass().getName()) || Main.proj.hashCode() != oldProj.hashCode()))
    172173        {
     
    181182        public SBPanel(Projection pr)
    182183        {
    183           super();
    184           p = pr;
     184            super();
     185            p = pr;
    185186        }
    186187        @Override
    187188        public void paint(java.awt.Graphics g)
    188189        {
    189           super.paint(g);
    190           ((ProjectionSubPrefs) p).setPreferences(((ProjectionSubPrefs) p).getPreferences(this));
    191           updateMeta(p);
    192         }
    193     };
     190            super.paint(g);
     191            ((ProjectionSubPrefs) p).setPreferences(((ProjectionSubPrefs) p).getPreferences(this));
     192            updateMeta(p);
     193        }
     194    }
    194195
    195196    /**
     
    228229            String name = proj.getClass().getName();
    229230            String sname = name.substring(name.lastIndexOf(".")+1);
    230             if(projHasPrefs(proj))
     231            if(projHasPrefs(proj)) {
    231232                ((ProjectionSubPrefs) proj).setPreferences(Main.pref.getCollection("projection.sub."+sname, null));
     233            }
    232234            if (name.equals(Main.pref.get("projection", Mercator.class.getName()))) {
    233235                projectionCombo.setSelectedIndex(i);
  • trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginListPanel.java

    r2924 r2990  
    2626
    2727public class PluginListPanel extends VerticallyScrollablePanel{
     28    @SuppressWarnings("unused")
    2829    private static final Logger logger = Logger.getLogger(PluginListPanel.class.getName());
    2930
  • trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginPreferencesModel.java

    r2986 r2990  
    2121
    2222public class PluginPreferencesModel extends Observable{
     23    @SuppressWarnings("unused")
    2324    private final static Logger logger = Logger.getLogger(PluginPreferencesModel.class.getName());
    2425
     
    157158        if (pi != null) {
    158159            selectedPluginsMap.put(pi,selected);
     160            if (pi.isUpdateRequired()) {
     161                pendingDownloads.add(pi.name);
     162            }
    159163        }
    160164        if (!selected) {
    161165            pendingDownloads.remove(name);
    162             return;
    163         }
    164         if (pi.isUpdateRequired()) {
    165             pendingDownloads.add(pi.name);
    166166        }
    167167    }
  • trunk/src/org/openstreetmap/josm/gui/preferences/server/OAuthAccessTokenHolder.java

    r2801 r2990  
    1414
    1515public class OAuthAccessTokenHolder {
     16    @SuppressWarnings("unused")
    1617    static private final Logger logger = Logger.getLogger(OAuthAccessTokenHolder.class.getName());
    1718
  • trunk/src/org/openstreetmap/josm/gui/preferences/server/OAuthAuthenticationPreferencesPanel.java

    r2877 r2990  
    4545 */
    4646public class OAuthAuthenticationPreferencesPanel extends JPanel implements PropertyChangeListener {
     47    @SuppressWarnings("unused")
    4748    private static final Logger logger = Logger.getLogger(OAuthAuthenticationPreferencesPanel.class.getName());
    4849
  • trunk/src/org/openstreetmap/josm/gui/progress/SwingRenderingProgressMonitor.java

    r2850 r2990  
    55
    66import org.openstreetmap.josm.tools.CheckParameterUtil;
    7 
    8 import static org.openstreetmap.josm.tools.I18n.tr;
    97
    108/**
  • trunk/src/org/openstreetmap/josm/gui/tagging/AutoCompletingTextField.java

    r2512 r2990  
    3333 */
    3434public class AutoCompletingTextField extends JTextField implements ComboBoxEditor, TableCellEditor {
    35 
     35    @SuppressWarnings("unused")
    3636    static private Logger logger = Logger.getLogger(AutoCompletingTextField.class.getName());
    3737
  • trunk/src/org/openstreetmap/josm/gui/tagging/TagCellRenderer.java

    r2974 r2990  
    2121 */
    2222public class TagCellRenderer extends JLabel implements TableCellRenderer  {
    23 
     23    @SuppressWarnings("unused")
    2424    private static final Logger logger = Logger.getLogger(TagCellRenderer.class.getName());
    2525
  • trunk/src/org/openstreetmap/josm/gui/tagging/TagEditorModel.java

    r2974 r2990  
    3333@SuppressWarnings("serial")
    3434public class TagEditorModel extends AbstractTableModel {
     35    @SuppressWarnings("unused")
    3536    static private final Logger logger = Logger.getLogger(TagEditorModel.class.getName());
    3637
  • trunk/src/org/openstreetmap/josm/gui/tagging/TagEditorPanel.java

    r2974 r2990  
    2626 */
    2727public class TagEditorPanel extends JPanel {
     28    @SuppressWarnings("unused")
    2829    static private final Logger logger = Logger.getLogger(TagEditorPanel.class.getName());
    2930    /** the tag editor model */
  • trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionCache.java

    r2974 r2990  
    3737 */
    3838public class AutoCompletionCache {
     39    @SuppressWarnings("unused")
    3940    static private final Logger logger = Logger.getLogger(AutoCompletionCache.class.getName());
    4041
Note: See TracChangeset for help on using the changeset viewer.