Changeset 2990 in josm for trunk/test/functional


Ignore:
Timestamp:
2010-02-15T09:03:57+01:00 (10 years ago)
Author:
jttt
Message:

Fix some eclipse warnings

Location:
trunk/test/functional/org/openstreetmap/josm/io
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/functional/org/openstreetmap/josm/io/MultiFetchServerObjectReaderTest.java

    r2600 r2990  
    204204        createDataSetOnServer(testDataSet);
    205205
    206         PrintWriter pw = null;
    207206        try {
    208             pw = new PrintWriter(
     207            PrintWriter pw = new PrintWriter(
    209208                    new FileWriter(dataSetCacheOutputFile)
    210209            );
     210            logger.info(MessageFormat.format("caching test data set in ''{0}'' ...", dataSetCacheOutputFile.toString()));
     211            OsmWriter w = new OsmWriter(pw, false, testDataSet.getVersion());
     212            w.header();
     213            w.writeDataSources(testDataSet);
     214            w.writeContent(testDataSet);
     215            w.footer();
     216            w.close();
     217            pw.close();
    211218        } catch(IOException e) {
    212219            fail(MessageFormat.format("failed to open file ''{0}'' for writing", dataSetCacheOutputFile.toString()));
    213220        }
    214         logger.info(MessageFormat.format("caching test data set in ''{0}'' ...", dataSetCacheOutputFile.toString()));
    215         OsmWriter w = new OsmWriter(pw, false, testDataSet.getVersion());
    216         w.header();
    217         w.writeDataSources(testDataSet);
    218         w.writeContent(testDataSet);
    219         w.footer();
    220         w.close();
    221         pw.close();
    222221    }
    223222
  • trunk/test/functional/org/openstreetmap/josm/io/OsmServerBackreferenceReaderTest.java

    r2600 r2990  
    211211        createDataSetOnServer(testDataSet);
    212212
    213         PrintWriter pw = null;
    214213        try {
    215             pw = new PrintWriter(
     214            PrintWriter pw = new PrintWriter(
    216215                    new FileWriter(dataSetCacheOutputFile)
    217216            );
     217            logger.info(MessageFormat.format("caching test data set in ''{0}'' ...", dataSetCacheOutputFile.toString()));
     218            OsmWriter w = new OsmWriter(pw, false, testDataSet.getVersion());
     219            w.header();
     220            w.writeDataSources(testDataSet);
     221            w.writeContent(testDataSet);
     222            w.footer();
     223            w.close();
     224            pw.close();
    218225        } catch(IOException e) {
    219226            fail(MessageFormat.format("failed to open file ''{0}'' for writing", dataSetCacheOutputFile.toString()));
    220227        }
    221         logger.info(MessageFormat.format("caching test data set in ''{0}'' ...", dataSetCacheOutputFile.toString()));
    222         OsmWriter w = new OsmWriter(pw, false, testDataSet.getVersion());
    223         w.header();
    224         w.writeDataSources(testDataSet);
    225         w.writeContent(testDataSet);
    226         w.footer();
    227         w.close();
    228         pw.close();
    229228    }
    230229
Note: See TracChangeset for help on using the changeset viewer.