Changeset 3385 in josm


Ignore:
Timestamp:
Jul 25, 2010 4:00:01 PM (3 years ago)
Author:
jttt
Message:

Fix warnings

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

Legend:

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

    r3384 r3385  
    9999    } 
    100100 
    101     /** 
    102      * needs to be overridden to be useful 
    103      */ 
    104     public void addListener(JosmAction a) { 
    105         return; 
    106     } 
    107  
    108101    private void setHelpId() { 
    109102        String helpId = "Action/"+getClass().getName().substring(getClass().getName().lastIndexOf('.')+1); 
  • trunk/src/org/openstreetmap/josm/actions/PasteTagsAction.java

    r3384 r3385  
    3030public final class PasteTagsAction extends JosmAction implements PasteBufferChangedListener { 
    3131 
    32     public PasteTagsAction(JosmAction copyAction) { 
     32    public PasteTagsAction() { 
    3333        super(tr("Paste Tags"), "pastetags", 
    3434                tr("Apply tags of contents of paste buffer to all selected items."), 
  • trunk/src/org/openstreetmap/josm/actions/search/PushbackTokenizer.java

    r3050 r3385  
    1414public class PushbackTokenizer { 
    1515 
    16     public class Range { 
     16    public static class Range { 
    1717        private final long start; 
    1818        private final long end; 
  • trunk/src/org/openstreetmap/josm/corrector/TagCorrector.java

    r3210 r3385  
    4141 * confirm these changes. 
    4242 */ 
    43   
     43 
    4444public abstract class TagCorrector<P extends OsmPrimitive> { 
    4545 
     
    7676            p.add(label2, GBC.eop().anchor(GBC.CENTER)); 
    7777 
    78             for (OsmPrimitive primitive : tagCorrectionsMap.keySet()) { 
    79                 final List<TagCorrection> tagCorrections = tagCorrectionsMap 
    80                 .get(primitive); 
     78            for (Entry<OsmPrimitive, List<TagCorrection>> entry : tagCorrectionsMap.entrySet()) { 
     79                final OsmPrimitive primitive = entry.getKey(); 
     80                final List<TagCorrection> tagCorrections = entry.getValue(); 
    8181 
    8282                if (tagCorrections.isEmpty()) { 
     
    102102            } 
    103103 
    104             for (OsmPrimitive primitive : roleCorrectionMap.keySet()) { 
    105                 final List<RoleCorrection> roleCorrections = roleCorrectionMap 
    106                 .get(primitive); 
     104            for (Entry<OsmPrimitive, List<RoleCorrection>> entry : roleCorrectionMap.entrySet()) { 
     105                final OsmPrimitive primitive = entry.getKey(); 
     106                final List<RoleCorrection> roleCorrections = entry.getValue(); 
     107 
    107108                if (roleCorrections.isEmpty()) { 
    108109                    continue; 
  • trunk/src/org/openstreetmap/josm/data/projection/Lambert.java

    r3343 r3385  
    8585    public static final int DEFAULT_ZONE = 0; 
    8686 
    87     private static int layoutZone = DEFAULT_ZONE; 
     87    private int layoutZone = DEFAULT_ZONE; 
    8888 
    8989    private static NTV2GridShiftFile ntf_rgf93Grid = null; 
  • trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java

    r3355 r3385  
    292292     */ 
    293293    protected void buttonAction(int buttonIndex, ActionEvent evt) { 
    294         String a = evt.getActionCommand(); 
    295294        result = buttonIndex+1; 
    296295        setVisible(false); 
  • trunk/src/org/openstreetmap/josm/gui/FileDrop.java

    r3083 r3385  
    323323 
    324324                    // Convert list to array 
    325                     final File[] files = (File[]) fileList.toArray(); 
     325                    final File[] files = fileList.toArray(new File[fileList.size()]); 
    326326 
    327327                    // Alert listener to drop. 
  • trunk/src/org/openstreetmap/josm/gui/MainMenu.java

    r3327 r3385  
    119119    public final JosmAction copy = new CopyAction(); 
    120120    public final JosmAction paste = new PasteAction(); 
    121     public final JosmAction pasteTags = new PasteTagsAction(copy); 
     121    public final JosmAction pasteTags = new PasteTagsAction(); 
    122122    public final JosmAction duplicate = new DuplicateAction(); 
    123123    public final JosmAction delete = new DeleteAction(); 
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/PasteTagsConflictResolverDialog.java

    r3083 r3385  
    175175        StatisticsInfo info = new StatisticsInfo(); 
    176176        info.numTags = tagsForAllPrimitives.getKeys().size(); 
    177         for (OsmPrimitiveType type: sourceStatistics.keySet()) { 
    178             info.sourceInfo.put(type, sourceStatistics.get(type)); 
    179         } 
    180         for (OsmPrimitiveType type: targetStatistics.keySet()) { 
    181             info.targetInfo.put(type, targetStatistics.get(type)); 
    182         } 
     177        info.sourceInfo.putAll(sourceStatistics); 
     178        info.targetInfo.putAll(targetStatistics); 
    183179        statisticsModel.append(info); 
    184180        validate(); 
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ThumbsLoader.java

    r2986 r3385  
    5050            } 
    5151        } 
    52         try { 
    53             layer.updateOffscreenBuffer = true; 
    54         } catch (Exception e) {} 
     52        layer.updateOffscreenBuffer = true; 
    5553        Main.map.mapView.repaint(); 
    5654        (new Thread() {             // clean up the garbage - shouldn't hurt 
  • trunk/src/org/openstreetmap/josm/gui/oauth/OAuthAuthorizationWizard.java

    r3121 r3385  
    5252 * This wizard walks the user to the necessary steps to retrieve an OAuth Access Token which 
    5353 * allows JOSM to access the OSM API on the users behalf. 
    54  *  
     54 * 
    5555 */ 
    5656public class OAuthAuthorizationWizard extends JDialog { 
     
    7070    /** 
    7171     * Builds the row with the action buttons 
    72      *  
     72     * 
    7373     * @return 
    7474     */ 
     
    9090    /** 
    9191     * Builds the panel with general information in the header 
    92      *  
     92     * 
    9393     * @return 
    9494     */ 
     
    207207    /** 
    208208     * Creates the wizard. 
    209      *  
     209     * 
    210210     * @param apiUrl the API URL. Must not be null. 
    211211     * @throws IllegalArgumentException thrown if apiUrl is null 
     
    220220    /** 
    221221     * Creates the wizard. 
    222      *  
     222     * 
    223223     * @param parent the component relative to which the dialog is displayed 
    224224     * @param apiUrl the API URL. Must not be null. 
     
    235235     * Sets the API URL for the API for which this wizard is generating 
    236236     * an Access Token. 
    237      *  
     237     * 
    238238     * @param apiUrl the API URL. Must not be null. 
    239239     * @throws IllegalArgumentException thrown if apiUrl is null 
     
    256256    /** 
    257257     * Replies true if the dialog was cancelled 
    258      *  
     258     * 
    259259     * @return true if the dialog was cancelled 
    260260     */ 
     
    274274    /** 
    275275     * Replies the Access Token entered using the wizard 
    276      *  
     276     * 
    277277     * @return the access token. May be null if the wizard was canceled. 
    278278     */ 
     
    283283    /** 
    284284     * Replies the current OAuth parameters. 
    285      *  
     285     * 
    286286     * @return the current OAuth parameters. 
    287287     */ 
     
    293293     * Replies true if the currently selected Access Token shall be saved to 
    294294     * the preferences. 
    295      *  
     295     * 
    296296     * @return true if the currently selected Access Token shall be saved to 
    297297     * the preferences 
     
    303303    /** 
    304304     * Initializes the dialog with values from the preferences 
    305      *  
     305     * 
    306306     */ 
    307307    public void initFromPreferences() { 
     
    389389    } 
    390390 
    391     class ExternalBrowserLauncher implements HyperlinkListener { 
     391    static class ExternalBrowserLauncher implements HyperlinkListener { 
    392392        public void hyperlinkUpdate(HyperlinkEvent e) { 
    393393            if (e.getEventType().equals(HyperlinkEvent.EventType.ACTIVATED)) { 
  • trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletingComboBox.java

    r3312 r3385  
    6969            int end = start; 
    7070            String curText = getText(0, size); 
    71              
     71 
    7272            // if the text starts with a number we don't autocomplete 
    7373            if (Main.pref.getBoolean("autocomplete.dont_complete_numbers", true)) { 
    7474                try { 
    7575                    Long.parseLong(str); 
    76                     if (curText.length() == 0) { 
     76                    if (curText.length() == 0) 
    7777                        // we don't autocomplete on numbers 
    7878                        return; 
    79                     } 
    8079                    Long.parseLong(curText); 
    8180                    return; 
     
    8584                } 
    8685            } 
    87              
     86 
    8887            // lookup and select a matching item 
    8988            Object item = lookupItem(curText); 
     
    226225     * renders an AutoCompletionListItem by showing only the string value part 
    227226     */ 
    228     public class AutoCompleteListCellRenderer extends JLabel implements ListCellRenderer { 
     227    public static class AutoCompleteListCellRenderer extends JLabel implements ListCellRenderer { 
    229228 
    230229        public AutoCompleteListCellRenderer() { 
  • trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionItemPritority.java

    r3214 r3385  
    2828     */ 
    2929    public static AutoCompletionItemPritority IS_IN_STANDARD = new AutoCompletionItemPritority(false, true, false); 
    30      
     30 
    3131    /** 
    3232     * Indicates that this is a value from a selected object. 
     
    6464     */ 
    6565    public int compareTo(AutoCompletionItemPritority other) { 
    66         int sel = new Boolean(selected).compareTo(other.selected); 
     66        int sel = Boolean.valueOf(selected).compareTo(other.selected); 
    6767        if (sel != 0) return sel; 
    6868 
    69         int ds = new Boolean(inDataSet).compareTo(other.inDataSet); 
     69        int ds = Boolean.valueOf(inDataSet).compareTo(other.inDataSet); 
    7070        if (ds != 0) return ds; 
    7171 
    72         int std = new Boolean(inStandard).compareTo(other.inStandard); 
     72        int std = Boolean.valueOf(inStandard).compareTo(other.inStandard); 
    7373        if (std != 0) return std; 
    7474 
     
    8282    public AutoCompletionItemPritority mergeWith(AutoCompletionItemPritority other) { 
    8383        return new AutoCompletionItemPritority( 
    84                         inDataSet || other.inDataSet, 
    85                         inStandard || other.inStandard, 
    86                         selected || other.selected); 
     84                inDataSet || other.inDataSet, 
     85                inStandard || other.inStandard, 
     86                selected || other.selected); 
    8787    } 
    8888 
  • trunk/src/org/openstreetmap/josm/tools/PresetTextComparator.java

    r3083 r3385  
    11package org.openstreetmap.josm.tools; 
    22 
     3import java.io.Serializable; 
    34import java.util.Comparator; 
    45 
    56import javax.swing.JMenuItem; 
    67 
    7 public class PresetTextComparator implements Comparator<JMenuItem> { 
     8public class PresetTextComparator implements Comparator<JMenuItem>, Serializable { 
    89    //TODO add error checking and stuff 
    910    public int compare(JMenuItem arg0, JMenuItem arg1) { 
  • trunk/src/org/openstreetmap/josm/tools/XmlObjectParser.java

    r3321 r3385  
    109109    } 
    110110 
    111     private class AddNamespaceFilter extends XMLFilterImpl { 
     111    private static class AddNamespaceFilter extends XMLFilterImpl { 
    112112 
    113113        private final String namespace; 
Note: See TracChangeset for help on using the changeset viewer.