Changeset 10164 in josm


Ignore:
Timestamp:
2016-04-29T11:03:45+02:00 (4 years ago)
Author:
Don-vip
Message:

add more unit tests

Location:
trunk
Files:
3 added
2 edited

Legend:

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

    r10129 r10164  
    149149            ids.add(cs.getId());
    150150        }
    151         if (parent == null)
    152             return new ChangesetHeaderDownloadTask(ids);
    153         else
    154             return new ChangesetHeaderDownloadTask(parent, ids);
     151        return new ChangesetHeaderDownloadTask(parent, ids);
    155152    }
    156153}
  • trunk/src/org/openstreetmap/josm/gui/util/GuiHelper.java

    r10035 r10164  
    1616import java.awt.GraphicsEnvironment;
    1717import java.awt.GridBagLayout;
     18import java.awt.HeadlessException;
    1819import java.awt.Image;
    1920import java.awt.Stroke;
     
    522523     */
    523524    public static Frame getFrameForComponent(Component parentComponent) {
    524         if (parentComponent == null && GraphicsEnvironment.isHeadless()) {
     525        try {
     526            return JOptionPane.getFrameForComponent(parentComponent);
     527        } catch (HeadlessException e) {
     528            if (Main.isDebugEnabled()) {
     529                Main.debug(e.getMessage());
     530            }
    525531            return null;
    526532        }
    527         return JOptionPane.getFrameForComponent(parentComponent);
    528533    }
    529534}
Note: See TracChangeset for help on using the changeset viewer.