Ignore:
Timestamp:
2015-12-31T03:24:56+01:00 (4 years ago)
Author:
Don-vip
Message:

OAuth: add robustness, basic unit test, code cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/ProgressInputStream.java

    r9185 r9227  
    1010import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
    1111import org.openstreetmap.josm.gui.progress.ProgressMonitor;
     12import org.openstreetmap.josm.tools.CheckParameterUtil;
    1213
    1314/**
     
    2324     * Constructs a new {@code ProgressInputStream}.
    2425     *
    25      * @param in the stream to monitor
     26     * @param in the stream to monitor. Must not be null
    2627     * @param size the total size which will be sent
    2728     * @param progressMonitor the monitor to report to
     
    2930     */
    3031    public ProgressInputStream(InputStream in, long size, ProgressMonitor progressMonitor) {
     32        CheckParameterUtil.ensureParameterNotNull(in, "in");
    3133        if (progressMonitor == null) {
    3234            progressMonitor = NullProgressMonitor.INSTANCE;
     
    4345     * @param con the connection to monitor
    4446     * @param progressMonitor the monitor to report to
     47     * @throws OsmTransferException if any I/O error occurs
    4548     */
    4649    public ProgressInputStream(URLConnection con, ProgressMonitor progressMonitor) throws OsmTransferException {
Note: See TracChangeset for help on using the changeset viewer.