Changeset 32912 in osm


Ignore:
Timestamp:
2016-09-03T17:01:47+02:00 (8 years ago)
Author:
donvip
Message:

fix some error-prone warnings

Location:
applications/editors/josm/plugins/lakewalker
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/lakewalker/.settings/org.eclipse.jdt.ui.prefs

    r19624 r32912  
    1 #Sun Jan 24 21:18:20 CET 2010
    21eclipse.preferences.version=1
    32editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
     
    98sp_cleanup.add_missing_nls_tags=false
    109sp_cleanup.add_missing_override_annotations=true
     10sp_cleanup.add_missing_override_annotations_interface_methods=true
    1111sp_cleanup.add_serial_version_id=false
    1212sp_cleanup.always_use_blocks=true
     
    1414sp_cleanup.always_use_this_for_non_static_field_access=false
    1515sp_cleanup.always_use_this_for_non_static_method_access=false
     16sp_cleanup.convert_functional_interfaces=false
    1617sp_cleanup.convert_to_enhanced_for_loop=false
    1718sp_cleanup.correct_indentation=false
    1819sp_cleanup.format_source_code=false
    1920sp_cleanup.format_source_code_changes_only=false
     21sp_cleanup.insert_inferred_type_arguments=false
    2022sp_cleanup.make_local_variable_final=false
    2123sp_cleanup.make_parameters_final=false
     
    3335sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
    3436sp_cleanup.remove_private_constructors=true
     37sp_cleanup.remove_redundant_type_arguments=true
    3538sp_cleanup.remove_trailing_whitespaces=true
    3639sp_cleanup.remove_trailing_whitespaces_all=true
     
    3841sp_cleanup.remove_unnecessary_casts=true
    3942sp_cleanup.remove_unnecessary_nls_tags=false
    40 sp_cleanup.remove_unused_imports=false
     43sp_cleanup.remove_unused_imports=true
    4144sp_cleanup.remove_unused_local_variables=false
    4245sp_cleanup.remove_unused_private_fields=true
     
    4649sp_cleanup.sort_members=false
    4750sp_cleanup.sort_members_all=false
     51sp_cleanup.use_anonymous_class_creation=false
    4852sp_cleanup.use_blocks=false
    4953sp_cleanup.use_blocks_only_for_return_and_throw=false
     54sp_cleanup.use_lambda=false
    5055sp_cleanup.use_parentheses_in_expressions=false
    5156sp_cleanup.use_this_for_non_static_field_access=false
  • applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/BooleanConfigurer.java

    r32676 r32912  
    6565            box.setSelected(booleanValue().booleanValue());
    6666            box.addItemListener(new java.awt.event.ItemListener() {
     67                @Override
    6768                public void itemStateChanged(java.awt.event.ItemEvent e) {
    6869                    setValue(box.isSelected());
  • applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/DoubleConfigurer.java

    r32676 r32912  
    1212
    1313    public DoubleConfigurer(String key, String name) {
    14         this(key, name, new Double(0));
     14        this(key, name, 0d);
    1515    }
    1616
  • applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/LakewalkerAction.java

    r32676 r32912  
    5858    }
    5959
     60    @Override
    6061    public void actionPerformed(ActionEvent e) {
    6162        if (Main.map == null || Main.map.mapView == null || active)
     
    8384
    8485                // sort files by date (most recent first)
    85                 Arrays.sort(wmsCache, new Comparator<File>() {
    86                     public int compare(File f1, File f2) {
    87                         return (int) (f2.lastModified()-f1.lastModified());
    88                     }
    89                 });
     86                Arrays.sort(wmsCache, Comparator.comparingLong(File::lastModified));
    9087
    9188                // delete aged or oversized, keep newest. Once size/age limit was reached delete all older files
     
    296293    }
    297294
     295    @Override
    298296    public void mouseClicked(MouseEvent e) {
    299297        if (active) {
     
    305303    }
    306304
     305    @Override
    307306    public void mouseEntered(MouseEvent e) {
    308307    }
    309308
     309    @Override
    310310    public void mouseExited(MouseEvent e) {
    311311    }
    312312
     313    @Override
    313314    public void mousePressed(MouseEvent e) {
    314315    }
    315316
     317    @Override
    316318    public void mouseReleased(MouseEvent e) {
    317319    }
  • applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/LakewalkerPreferences.java

    r32676 r32912  
    7373    }
    7474
     75    @Override
    7576    public void addGui(PreferenceTabbedPane gui) {
     77        //CHECKSTYLE.OFF: LineLength
    7678        maxSegsConfig.setToolTipText(tr("Maximum number of segments allowed in each generated way. Default 250."));
    7779        maxNodesConfig.setToolTipText(tr("Maximum number of nodes to generate before bailing out (before simplifying lines). Default 50000."));
     
    8890        maxCacheAgeConfig.setToolTipText(tr("Maximum age of each cached file in days. Default is 100"));
    8991        sourceConfig.setToolTipText(tr("Data source text. Default is Landsat."));
     92        //CHECKSTYLE.ON: LineLength
    9093
    9194        /*String description =*/ tr("A plugin to trace water bodies on Landsat imagery.");
     
    148151    * Save entered preference values on OK button
    149152    */
     153    @Override
    150154    public boolean ok() {
    151155        Main.pref.put(PREF_MAX_SEG, maxSegsConfig.getValueString());
  • applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/StringEnumConfigurer.java

    r32676 r32912  
    5050            setValue(value);
    5151            box.addActionListener(new ActionListener() {
     52                @Override
    5253                public void actionPerformed(ActionEvent e) {
    5354                    noUpdate = true;
Note: See TracChangeset for help on using the changeset viewer.