Changeset 6367 in josm for trunk/src/org/openstreetmap/josm


Ignore:
Timestamp:
2013-11-05T23:12:52+01:00 (10 years ago)
Author:
Don-vip
Message:

Sonar/Findbugs - unused code

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

Legend:

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

    r6336 r6367  
    12961296
    12971297    /**
    1298      * This method filters the list of relations that form the multipolygons.
    1299      * @param relations all relations
    1300      * @param polygons polygons for filtering
    1301      * @return relations which don't form the polygons
    1302      */
    1303     private List<Relation> filterOwnMultipolygonRelations(Collection<Relation> relations, List<Multipolygon> polygons) {
    1304 
    1305         List<Relation> relationsToRemove = new ArrayList<Relation>();
    1306 
    1307         for (Multipolygon m : polygons) {
    1308             if (m.relation != null) {
    1309                 relationsToRemove.add(m.relation);
    1310             }
    1311         }
    1312 
    1313         List<Relation> result = new ArrayList<Relation>();
    1314 
    1315         result.addAll(relations);
    1316         result.removeAll(relationsToRemove);
    1317         return result;
    1318     }
    1319 
    1320     /**
    13211298     * Will add own multipolygon relation to the "previously existing" relations. Fixup is done by fixRelations
    13221299     * @param inner List of already closed inner ways
  • trunk/src/org/openstreetmap/josm/actions/mapmode/ParallelWayAction.java

    r6316 r6367  
    289289    }
    290290
    291     private boolean isValidModifierCombination() {
    292         // TODO: implement to give feedback on invalid modifier combination
    293         return true;
    294     }
    295 
    296291    private boolean sanityCheck() {
    297292        // @formatter:off
  • trunk/src/org/openstreetmap/josm/data/Preferences.java

    r6317 r6367  
    466466    }
    467467
    468     synchronized private Map<String, String> getAllPrefixDefault(final String prefix) {
    469         final Map<String,String> all = new TreeMap<String,String>();
    470         for (final Entry<String,String> e : defaults.entrySet()) {
    471             if (e.getKey().startsWith(prefix)) {
    472                 all.put(e.getKey(), e.getValue());
    473             }
    474         }
    475         return all;
    476     }
    477 
    478468    synchronized public Map<String, String> getAllColors() {
    479469        final Map<String,String> all = new TreeMap<String,String>();
  • trunk/src/org/openstreetmap/josm/gui/DefaultNameFormatter.java

    r6316 r6367  
    411411    }
    412412
    413     private String getLeadingNumber(String s) {
    414         int i = 0;
    415         while (i < s.length() && Character.isDigit(s.charAt(i))) {
    416             i++;
    417         }
    418         return s.substring(0, i);
    419     }
    420 
    421413    private String getRelationTypeName(IRelation relation) {
    422414        String name = trc("Relation type", relation.get("type"));
  • trunk/src/org/openstreetmap/josm/gui/SideButton.java

    r6246 r6367  
    8080    }
    8181
    82     private void setup(String name, String property, String tooltip, ActionListener actionListener)
    83     {
    84         doStyle();
    85         setActionCommand(name);
    86         addActionListener(actionListener);
    87         setToolTipText(tooltip);
    88         putClientProperty("help", "Dialog/"+property+"/"+name);
    89     }
    90 
    91     private void doStyle()
    92     {
     82    private void doStyle() {
    9383        setLayout(new BorderLayout());
    9484        setIconTextGap(2);
  • trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceTabbedPane.java

    r6362 r6367  
    118118
    119119        private PreferenceScrollPane(PreferencePanel preferencePanel) {
    120             super(preferencePanel.getComponent());
    121             this.preferenceSetting = preferencePanel.getTabPreferenceSetting();
     120            this(preferencePanel.getComponent(), preferencePanel.getTabPreferenceSetting());
    122121        }
    123122
  • trunk/src/org/openstreetmap/josm/tools/Shortcut.java

    r6362 r6367  
    3737    private String shortText;        // the unique ID of the shortcut
    3838    private String longText;         // a human readable description that will be shown in the preferences
    39     private int requestedKey;        // the key, the caller requested
    40     private int requestedGroup;      // the group, the caller requested
     39    private final int requestedKey;  // the key, the caller requested
     40    private final int requestedGroup;// the group, the caller requested
    4141    private int assignedKey;         // the key that actually is used
    4242    private int assignedModifier;    // the modifiers that are used
     
    7272    private void setLongText(String longText) {
    7373        this.longText = longText;
    74     }
    75 
    76     private int getRequestedKey() {
    77         return requestedKey;
    78     }
    79 
    80     public int getRequestedGroup() {
    81         return requestedGroup;
    8274    }
    8375
Note: See TracChangeset for help on using the changeset viewer.