Changeset 13174 in josm for trunk/src


Ignore:
Timestamp:
2017-11-28T02:52:05+01:00 (6 years ago)
Author:
Don-vip
Message:

see #15310 - fix unit tests, warnings

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

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/command/Command.java

    r13173 r13174  
    1010import java.util.Objects;
    1111
    12 import org.openstreetmap.josm.Main;
    1312import org.openstreetmap.josm.data.coor.EastNorth;
    1413import org.openstreetmap.josm.data.coor.LatLon;
  • trunk/src/org/openstreetmap/josm/data/StructUtils.java

    r13173 r13174  
    197197     * @return an object of class T, initialized as described above
    198198     */
    199     @SuppressWarnings("deprecation")
    200199    public static <T> T deserializeStruct(Map<String, String> hash, Class<T> klass) {
    201200        T struct = null;
  • trunk/src/org/openstreetmap/josm/gui/MainApplication.java

    r13173 r13174  
    181181 * @author imi
    182182 */
    183 @SuppressWarnings("deprecation")
    184183public class MainApplication extends Main {
    185184
     
    472471     * Should set {@link #menu} and {@link #mainPanel}
    473472     */
    474     @SuppressWarnings("deprecation")
    475473    protected void initializeMainWindow() {
    476474        if (mainFrame != null) {
     
    572570     * @since 12636 (as a replacement to {@code Main.getLayerManager()})
    573571     */
    574     @SuppressWarnings("deprecation")
    575572    public static MainLayerManager getLayerManager() {
    576573        return layerManager;
     
    625622     * @since 12630 (as a replacement to {@code Main.isDisplayingMapView()})
    626623     */
    627     @SuppressWarnings("deprecation")
    628624    public static boolean isDisplayingMapView() {
    629625        return map != null && map.mapView != null;
     
    663659     * @since 12639 (as a replacement to {@code Main.addAndFireMapFrameListener})
    664660     */
    665     @SuppressWarnings("deprecation")
    666661    public static boolean addAndFireMapFrameListener(MapFrameListener listener) {
    667662        return mainPanel != null && mainPanel.addAndFireMapFrameListener(listener);
     
    675670     * @since 12639 (as a replacement to {@code Main.addMapFrameListener})
    676671     */
    677     @SuppressWarnings("deprecation")
    678672    public static boolean addMapFrameListener(MapFrameListener listener) {
    679673        return mainPanel != null && mainPanel.addMapFrameListener(listener);
     
    686680     * @since 12639 (as a replacement to {@code Main.removeMapFrameListener})
    687681     */
    688     @SuppressWarnings("deprecation")
    689682    public static boolean removeMapFrameListener(MapFrameListener listener) {
    690683        return mainPanel != null && mainPanel.removeMapFrameListener(listener);
     
    696689     * @since 12639 (as a replacement to {@code Main.registerActionShortcut})
    697690     */
    698     @SuppressWarnings("deprecation")
    699691    public static void registerActionShortcut(JosmAction action) {
    700692        registerActionShortcut(action, action.getShortcut());
     
    707699     * @since 12639 (as a replacement to {@code Main.registerActionShortcut})
    708700     */
    709     @SuppressWarnings("deprecation")
    710701    public static void registerActionShortcut(Action action, Shortcut shortcut) {
    711702        KeyStroke keyStroke = shortcut.getKeyStroke();
     
    728719     * @since 12639 (as a replacement to {@code Main.unregisterShortcut})
    729720     */
    730     @SuppressWarnings("deprecation")
    731721    public static void unregisterShortcut(Shortcut shortcut) {
    732722        contentPanePrivate.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).remove(shortcut.getKeyStroke());
     
    738728     * @since 12639 (as a replacement to {@code Main.unregisterActionShortcut})
    739729     */
    740     @SuppressWarnings("deprecation")
    741730    public static void unregisterActionShortcut(JosmAction action) {
    742731        unregisterActionShortcut(action, action.getShortcut());
     
    749738     * @since 12639 (as a replacement to {@code Main.unregisterActionShortcut})
    750739     */
    751     @SuppressWarnings("deprecation")
    752740    public static void unregisterActionShortcut(Action action, Shortcut shortcut) {
    753741        unregisterShortcut(shortcut);
     
    761749     * @since 12639 (as a replacement to {@code Main.getRegisteredActionShortcut})
    762750     */
    763     @SuppressWarnings("deprecation")
    764751    public static Action getRegisteredActionShortcut(Shortcut shortcut) {
    765752        KeyStroke keyStroke = shortcut.getKeyStroke();
     
    845832     * @param argArray Command-line arguments
    846833     */
    847     @SuppressWarnings("deprecation")
    848834    public static void main(final String[] argArray) {
    849835        I18n.init();
  • trunk/src/org/openstreetmap/josm/gui/MainPanel.java

    r13173 r13174  
    4444     * @param showMap If the map should be displayed.
    4545     */
    46     @SuppressWarnings("deprecation")
    4746    protected synchronized void updateContent(boolean showMap) {
    4847        GuiHelper.assertCallFromEdt();
     
    8483    }
    8584
    86     @SuppressWarnings("deprecation")
    8785    private MapFrame createNewMapFrame() {
    8886        MapFrame mapFrame = new MapFrame(null);
  • trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletingComboBox.java

    r13173 r13174  
    245245     */
    246246    @Override
    247     @SuppressWarnings("deprecation")
    248247    public void configureEditor(ComboBoxEditor cbEditor, Object item) {
    249248        if (item == null) {
     
    262261     */
    263262    @Override
    264     @SuppressWarnings("deprecation")
    265263    public void setSelectedItem(Object item) {
    266264        if (item == null) {
  • trunk/src/org/openstreetmap/josm/gui/util/AdvancedKeyPressDetector.java

    r13173 r13174  
    147147
    148148    @Override
    149     @SuppressWarnings("deprecation")
    150149    public void eventDispatched(AWTEvent e) {
    151150        if (!(e instanceof KeyEvent)) {
Note: See TracChangeset for help on using the changeset viewer.