Changeset 14154 in josm for trunk/src/org


Ignore:
Timestamp:
2018-08-13T09:08:04+02:00 (6 years ago)
Author:
Don-vip
Message:

see #15229 - fix warnings

Location:
trunk/src/org/openstreetmap/josm
Files:
1 added
4 edited

Legend:

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

    r14153 r14154  
    7373    /**
    7474     * Creates the download task for a collection of changeset ids. Uses a {@link org.openstreetmap.josm.gui.PleaseWaitDialog}
    75      * whose parent is {@link Main#parent}.
     75     * whose parent is {@link MainApplication#getMainFrame}.
    7676     *
    7777     * Null ids or or ids <= 0 in the id collection are ignored.
  • trunk/src/org/openstreetmap/josm/gui/MainApplication.java

    r14153 r14154  
    6666
    6767import org.jdesktop.swinghelper.debug.CheckThreadViolationRepaintManager;
    68 import org.openstreetmap.josm.Main;
    6968import org.openstreetmap.josm.actions.DeleteAction;
    7069import org.openstreetmap.josm.actions.JosmAction;
     
    150149import org.openstreetmap.josm.spi.lifecycle.Lifecycle;
    151150import org.openstreetmap.josm.spi.preferences.Config;
    152 import org.openstreetmap.josm.spi.preferences.PreferenceChangeEvent;
    153 import org.openstreetmap.josm.spi.preferences.PreferenceChangedListener;
    154151import org.openstreetmap.josm.tools.FontsManager;
    155152import org.openstreetmap.josm.tools.GBC;
     
    175172 */
    176173@SuppressWarnings("deprecation")
    177 public class MainApplication extends Main {
     174public class MainApplication extends org.openstreetmap.josm.Main {
    178175
    179176    /**
     
    857854        }
    858855        updateSystemProperties();
    859         Preferences.main().addPreferenceChangeListener(new PreferenceChangedListener() {
    860             @Override
    861             public void preferenceChanged(PreferenceChangeEvent e) {
    862                 updateSystemProperties();
    863             }
    864         });
     856        Preferences.main().addPreferenceChangeListener(e -> updateSystemProperties());
    865857
    866858        checkIPv6();
     
    887879        }
    888880        mainPanel = mainFrame.getPanel();
    889         Main.parent = mainFrame;
     881        org.openstreetmap.josm.Main.parent = mainFrame;
    890882
    891883        if (args.hasOption(Option.LOAD_PREFERENCES)) {
  • trunk/src/org/openstreetmap/josm/gui/MenuScroller.java

    r14153 r14154  
    1717
    1818import javax.swing.Icon;
    19 import javax.swing.JFrame;
    2019import javax.swing.JMenu;
    2120import javax.swing.JMenuItem;
     
    5756        if (menu != null) {
    5857            // Compute max height of current screen
    59             int maxHeight = WindowGeometry.getMaxDimensionOnScreen(menu).height - ((JFrame) MainApplication.getMainFrame()).getInsets().top;
     58            int maxHeight = WindowGeometry.getMaxDimensionOnScreen(menu).height - MainApplication.getMainFrame().getInsets().top;
    6059
    6160            // Remove top fixed part height
     
    312311            }
    313312
    314             int allowedHeight = WindowGeometry.getMaxDimensionOnScreen(menu).height - ((JFrame) MainApplication.getMainFrame()).getInsets().top;
     313            int allowedHeight = WindowGeometry.getMaxDimensionOnScreen(menu).height - MainApplication.getMainFrame().getInsets().top;
    315314
    316315            boolean mustSCroll = allItemsHeight > allowedHeight;
  • trunk/src/org/openstreetmap/josm/io/GeoJSONWriter.java

    r14115 r14154  
    165165
    166166    protected void appendPrimitive(OsmPrimitive p, JsonArrayBuilder array) {
    167         if (p.isIncomplete()) {
    168             return;
    169         } else if (SKIP_EMPTY_NODES.get() && p instanceof Node && p.getKeys().isEmpty()) {
     167        if (p.isIncomplete() ||
     168            (SKIP_EMPTY_NODES.get() && p instanceof Node && p.getKeys().isEmpty())) {
    170169            return;
    171170        }
Note: See TracChangeset for help on using the changeset viewer.