Changeset 2990 in josm for trunk/test


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

Fix some eclipse warnings

Location:
trunk/test
Files:
5 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
  • trunk/test/unit/org/openstreetmap/josm/data/osm/history/HistoryWayTest.java

    r1750 r2990  
    33
    44import static org.junit.Assert.assertEquals;
    5 import static org.junit.Assert.*;
     5import static org.junit.Assert.fail;
    66
    77import java.util.ArrayList;
     
    1414
    1515    @Test
    16     public void HistoryWayTest() {
     16    public void wayTest() {
    1717        Date d = new Date();
    1818        HistoryWay way = new HistoryWay(
  • trunk/test/unit/org/openstreetmap/josm/gui/conflict/nodes/NodeListMergeModelTest.java

    r2626 r2990  
    729729                events.add(evt);
    730730            }
    731         };
     731        }
    732732        MyListener listener = new MyListener();
    733733        model.addPropertyChangeListener(listener);
  • trunk/test/unit/org/openstreetmap/josm/gui/conflict/tags/TagMergeModelTest.java

    r2676 r2990  
    1616import org.openstreetmap.josm.gui.conflict.pair.tags.TagMergeModel;
    1717
     18@SuppressWarnings("unchecked")
    1819public class TagMergeModelTest {
    1920
Note: See TracChangeset for help on using the changeset viewer.