Ignore:
Timestamp:
2014-10-19T01:27:04+02:00 (10 years ago)
Author:
donvip
Message:

[josm_plugins] fix java 7 warnings / global usage of try-with-resource

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/util/http/HttpConnector.java

    r25591 r30738  
    3838import java.net.URLEncoder;
    3939import java.util.Map;
     40
    4041import org.openstreetmap.josm.plugins.mapdust.util.retry.RetryAgent;
    4142import org.openstreetmap.josm.plugins.mapdust.util.retry.RetrySetup;
     
    160161                /* 3: write content */
    161162                if (sbEncodeParameters.length() > 0) {
    162                     OutputStreamWriter out =
    163                             new OutputStreamWriter(connection.getOutputStream());
    164 
    165                     out.write(sbEncodeParameters.toString());
    166                     out.close();
     163                    try (OutputStreamWriter out =
     164                            new OutputStreamWriter(connection.getOutputStream())) {
     165                        out.write(sbEncodeParameters.toString());
     166                    }
    167167                }
    168168
Note: See TracChangeset for help on using the changeset viewer.