Index: trunk/test/unit/org/openstreetmap/josm/actions/CreateMultipolygonActionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/actions/CreateMultipolygonActionTest.java	(revision 15022)
+++ trunk/test/unit/org/openstreetmap/josm/actions/CreateMultipolygonActionTest.java	(revision 15034)
@@ -4,5 +4,6 @@
 import static org.junit.Assert.assertEquals;
 
-import java.io.FileInputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 import java.util.Collection;
 import java.util.Map;
@@ -74,5 +75,5 @@
     @Test
     public void testCreate1() throws Exception {
-        DataSet ds = OsmReader.parseDataSet(new FileInputStream(TestUtils.getTestDataRoot() + "create_multipolygon.osm"), null);
+        DataSet ds = OsmReader.parseDataSet(Files.newInputStream(Paths.get(TestUtils.getTestDataRoot(), "create_multipolygon.osm")), null);
         Pair<SequenceCommand, Relation> mp = CreateMultipolygonAction.createMultipolygonCommand(ds.getWays(), null);
         assertEquals("Sequence: Create multipolygon", mp.a.getDescriptionText());
@@ -82,5 +83,5 @@
     @Test
     public void testCreate2() throws Exception {
-        DataSet ds = OsmReader.parseDataSet(new FileInputStream(TestUtils.getTestDataRoot() + "create_multipolygon.osm"), null);
+        DataSet ds = OsmReader.parseDataSet(Files.newInputStream(Paths.get(TestUtils.getTestDataRoot(), "create_multipolygon.osm")), null);
         Relation mp = createMultipolygon(ds.getWays(), "ref=1 OR ref:1.1.", null, true);
         assertEquals("{1=outer, 1.1.1=inner, 1.1.2=inner}", getRefToRoleMap(mp).toString());
@@ -89,5 +90,5 @@
     @Test
     public void testUpdate1() throws Exception {
-        DataSet ds = OsmReader.parseDataSet(new FileInputStream(TestUtils.getTestDataRoot() + "create_multipolygon.osm"), null);
+        DataSet ds = OsmReader.parseDataSet(Files.newInputStream(Paths.get(TestUtils.getTestDataRoot(), "create_multipolygon.osm")), null);
         Relation mp = createMultipolygon(ds.getWays(), "ref=\".*1$\"", null, true);
         assertEquals(3, mp.getMembersCount());
@@ -100,5 +101,5 @@
     @Test
     public void testUpdate2() throws Exception {
-        DataSet ds = OsmReader.parseDataSet(new FileInputStream(TestUtils.getTestDataRoot() + "create_multipolygon.osm"), null);
+        DataSet ds = OsmReader.parseDataSet(Files.newInputStream(Paths.get(TestUtils.getTestDataRoot(), "create_multipolygon.osm")), null);
         Relation mp = createMultipolygon(ds.getWays(), "ref=1 OR ref:1.1.1", null, true);
         assertEquals("{1=outer, 1.1.1=inner}", getRefToRoleMap(mp).toString());
Index: trunk/test/unit/org/openstreetmap/josm/actions/JoinAreasActionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/actions/JoinAreasActionTest.java	(revision 15022)
+++ trunk/test/unit/org/openstreetmap/josm/actions/JoinAreasActionTest.java	(revision 15034)
@@ -5,7 +5,8 @@
 import static org.junit.Assert.assertTrue;
 
-import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.InputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 import java.util.Arrays;
 import java.util.Collection;
@@ -106,8 +107,8 @@
     public void testExamples() throws Exception {
         DataSet dsToJoin, dsExpected;
-        try (InputStream is = new FileInputStream("data_nodist/Join_Areas_Tests.osm")) {
+        try (InputStream is = Files.newInputStream(Paths.get("data_nodist/Join_Areas_Tests.osm"))) {
             dsToJoin = OsmReader.parseDataSet(is, NullProgressMonitor.INSTANCE);
         }
-        try (InputStream is = new FileInputStream("data_nodist/Join_Areas_Tests_joined.osm")) {
+        try (InputStream is = Files.newInputStream(Paths.get("data_nodist/Join_Areas_Tests_joined.osm"))) {
             dsExpected = OsmReader.parseDataSet(is, NullProgressMonitor.INSTANCE);
         }
Index: trunk/test/unit/org/openstreetmap/josm/actions/OrthogonalizeActionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/actions/OrthogonalizeActionTest.java	(revision 15022)
+++ trunk/test/unit/org/openstreetmap/josm/actions/OrthogonalizeActionTest.java	(revision 15034)
@@ -4,5 +4,7 @@
 import static org.junit.Assert.assertEquals;
 
-import java.io.FileInputStream;
+import java.io.InputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 import java.util.ArrayList;
 import java.util.List;
@@ -97,5 +99,5 @@
 
     DataSet performTest(String... search) throws Exception {
-        try (FileInputStream in = new FileInputStream(TestUtils.getTestDataRoot() + "orthogonalize.osm")) {
+        try (InputStream in = Files.newInputStream(Paths.get(TestUtils.getTestDataRoot(), "orthogonalize.osm"))) {
             final DataSet ds = OsmReader.parseDataSet(in, null);
             // TODO: Executing commands depends on active edit layer
Index: trunk/test/unit/org/openstreetmap/josm/data/osm/FilterTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/osm/FilterTest.java	(revision 15022)
+++ trunk/test/unit/org/openstreetmap/josm/data/osm/FilterTest.java	(revision 15034)
@@ -6,6 +6,7 @@
 import static org.junit.Assert.assertTrue;
 
-import java.io.FileInputStream;
 import java.io.InputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 import java.util.Arrays;
 import java.util.Collection;
@@ -73,5 +74,5 @@
         for (int i : new int[] {1, 2, 3, 11, 12, 13, 14, 15}) {
             DataSet ds;
-            try (InputStream is = new FileInputStream("data_nodist/filterTests.osm")) {
+            try (InputStream is = Files.newInputStream(Paths.get("data_nodist/filterTests.osm"))) {
                 ds = OsmReader.parseDataSet(is, NullProgressMonitor.INSTANCE);
             }
Index: trunk/test/unit/org/openstreetmap/josm/data/osm/QuadBucketsTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/osm/QuadBucketsTest.java	(revision 15022)
+++ trunk/test/unit/org/openstreetmap/josm/data/osm/QuadBucketsTest.java	(revision 15034)
@@ -4,6 +4,7 @@
 import static org.openstreetmap.josm.TestUtils.getPrivateField;
 
-import java.io.FileInputStream;
 import java.io.InputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 import java.security.SecureRandom;
 import java.util.ArrayList;
@@ -84,5 +85,5 @@
     public void testRemove() throws Exception {
         ProjectionRegistry.setProjection(Projections.getProjectionByCode("EPSG:3857")); // Mercator
-        try (InputStream fis = new FileInputStream("data_nodist/restriction.osm")) {
+        try (InputStream fis = Files.newInputStream(Paths.get("data_nodist/restriction.osm"))) {
             DataSet ds = OsmReader.parseDataSet(fis, NullProgressMonitor.INSTANCE);
             removeAllTest(ds);
@@ -97,5 +98,5 @@
     public void testMove() throws Exception {
         ProjectionRegistry.setProjection(Projections.getProjectionByCode("EPSG:3857")); // Mercator
-        try (InputStream fis = new FileInputStream("data_nodist/restriction.osm")) {
+        try (InputStream fis = Files.newInputStream(Paths.get("data_nodist/restriction.osm"))) {
             DataSet ds = OsmReader.parseDataSet(fis, NullProgressMonitor.INSTANCE);
 
Index: trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionRefTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionRefTest.java	(revision 15022)
+++ trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionRefTest.java	(revision 15034)
@@ -5,6 +5,4 @@
 import java.io.BufferedWriter;
 import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
@@ -15,4 +13,6 @@
 import java.lang.reflect.Method;
 import java.nio.charset.StandardCharsets;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 import java.security.SecureRandom;
 import java.util.ArrayList;
@@ -121,5 +121,5 @@
         }
         try (BufferedReader in = new BufferedReader(new InputStreamReader(
-                new FileInputStream(REFERENCE_DATA_FILE), StandardCharsets.UTF_8))) {
+                Files.newInputStream(Paths.get(REFERENCE_DATA_FILE)), StandardCharsets.UTF_8))) {
             String line;
             Pattern projPattern = Pattern.compile("<(.+?)>(.*)<>");
@@ -357,5 +357,5 @@
         }
         try (BufferedWriter out = new BufferedWriter(new OutputStreamWriter(
-                new FileOutputStream(REFERENCE_DATA_FILE), StandardCharsets.UTF_8))) {
+                Files.newOutputStream(Paths.get(REFERENCE_DATA_FILE)), StandardCharsets.UTF_8))) {
             for (Map.Entry<String, RefEntry> e : refsMap.entrySet()) {
                 RefEntry ref = e.getValue();
Index: trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionRegressionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionRegressionTest.java	(revision 15022)
+++ trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionRegressionTest.java	(revision 15034)
@@ -5,11 +5,11 @@
 import java.io.BufferedWriter;
 import java.io.File;
-import java.io.FileInputStream;
 import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStreamReader;
 import java.io.OutputStreamWriter;
 import java.nio.charset.StandardCharsets;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 import java.security.SecureRandom;
 import java.util.ArrayList;
@@ -89,5 +89,5 @@
         Random rand = new SecureRandom();
         try (BufferedWriter out = new BufferedWriter(new OutputStreamWriter(
-                new FileOutputStream(PROJECTION_DATA_FILE), StandardCharsets.UTF_8))) {
+                Files.newOutputStream(Paths.get(PROJECTION_DATA_FILE)), StandardCharsets.UTF_8))) {
             out.write("# Data for test/unit/org/openstreetmap/josm/data/projection/ProjectionRegressionTest.java\n");
             out.write("# Format: 1. Projection code; 2. lat/lon; 3. lat/lon projected -> east/north; 4. east/north (3.) inverse projected\n");
@@ -114,5 +114,5 @@
 
     private static List<TestData> readData() throws IOException, FileNotFoundException {
-        try (BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(PROJECTION_DATA_FILE),
+        try (BufferedReader in = new BufferedReader(new InputStreamReader(Files.newInputStream(Paths.get(PROJECTION_DATA_FILE)),
                 StandardCharsets.UTF_8))) {
             List<TestData> result = new ArrayList<>();
Index: trunk/test/unit/org/openstreetmap/josm/data/validation/tests/UnconnectedWaysTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/validation/tests/UnconnectedWaysTest.java	(revision 15022)
+++ trunk/test/unit/org/openstreetmap/josm/data/validation/tests/UnconnectedWaysTest.java	(revision 15034)
@@ -5,8 +5,9 @@
 import static org.junit.Assert.assertThat;
 
-import java.io.FileInputStream;
 import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.InputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 
 import org.junit.Before;
@@ -45,5 +46,5 @@
     @Test
     public void testTicket6313() throws IOException, IllegalDataException, FileNotFoundException {
-        try (InputStream fis = new FileInputStream("data_nodist/UnconnectedWaysTest.osm")) {
+        try (InputStream fis = Files.newInputStream(Paths.get("data_nodist/UnconnectedWaysTest.osm"))) {
             final DataSet ds = OsmReader.parseDataSet(fis, NullProgressMonitor.INSTANCE);
             bib.visit(ds.allPrimitives());
Index: trunk/test/unit/org/openstreetmap/josm/data/validation/tests/ValidatorTestUtils.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/validation/tests/ValidatorTestUtils.java	(revision 15022)
+++ trunk/test/unit/org/openstreetmap/josm/data/validation/tests/ValidatorTestUtils.java	(revision 15034)
@@ -6,6 +6,7 @@
 import static org.junit.Assert.fail;
 
-import java.io.FileInputStream;
 import java.io.InputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 import java.util.ArrayList;
 import java.util.Collections;
@@ -35,5 +36,5 @@
             Function<DataSet, Iterable<T>> provider, Predicate<String> namePredicate,
             Test... tests) throws Exception {
-        try (InputStream is = new FileInputStream(sampleFile)) {
+        try (InputStream is = Files.newInputStream(Paths.get(sampleFile))) {
             for (T t: provider.apply(OsmReader.parseDataSet(is, null))) {
                 String name = DefaultNameFormatter.getInstance().format(t);
Index: trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/sort/RelationSorterTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/sort/RelationSorterTest.java	(revision 15022)
+++ trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/sort/RelationSorterTest.java	(revision 15034)
@@ -2,7 +2,8 @@
 package org.openstreetmap.josm.gui.dialogs.relation.sort;
 
-import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.InputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 import java.util.List;
 
@@ -44,5 +45,5 @@
     public void loadData() throws IllegalDataException, IOException {
         if (testDataset == null) {
-            try (InputStream fis = new FileInputStream("data_nodist/relation_sort.osm")) {
+            try (InputStream fis = Files.newInputStream(Paths.get("data_nodist/relation_sort.osm"))) {
                 testDataset = OsmReader.parseDataSet(fis, NullProgressMonitor.INSTANCE);
             }
Index: trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/sort/WayConnectionTypeCalculatorTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/sort/WayConnectionTypeCalculatorTest.java	(revision 15022)
+++ trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/sort/WayConnectionTypeCalculatorTest.java	(revision 15034)
@@ -2,7 +2,8 @@
 package org.openstreetmap.josm.gui.dialogs.relation.sort;
 
-import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.InputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -46,5 +47,5 @@
     public void loadData() throws IllegalDataException, IOException {
         if (testDataset == null) {
-            try (InputStream fis = new FileInputStream("data_nodist/relation_sort.osm")) {
+            try (InputStream fis = Files.newInputStream(Paths.get("data_nodist/relation_sort.osm"))) {
                 testDataset = OsmReader.parseDataSet(fis, NullProgressMonitor.INSTANCE);
             }
Index: trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/ChildOrParentSelectorTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/ChildOrParentSelectorTest.java	(revision 15022)
+++ trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/ChildOrParentSelectorTest.java	(revision 15034)
@@ -6,5 +6,6 @@
 import static org.junit.Assert.assertTrue;
 
-import java.io.FileInputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 import java.util.Arrays;
 
@@ -188,5 +189,5 @@
     @Test
     public void testContains() throws Exception {
-        ds = OsmReader.parseDataSet(new FileInputStream("data_nodist/amenity-in-amenity.osm"), null);
+        ds = OsmReader.parseDataSet(Files.newInputStream(Paths.get("data_nodist/amenity-in-amenity.osm")), null);
         ChildOrParentSelector css = parse("node[tag(\"amenity\") = parent_tag(\"amenity\")] ∈ *[amenity] {}");
         assertTrue(css.matches(new Environment(ds.getPrimitiveById(123, OsmPrimitiveType.WAY))));
Index: trunk/test/unit/org/openstreetmap/josm/io/GeoJSONWriterTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/io/GeoJSONWriterTest.java	(revision 15022)
+++ trunk/test/unit/org/openstreetmap/josm/io/GeoJSONWriterTest.java	(revision 15034)
@@ -5,5 +5,7 @@
 import static org.junit.Assert.assertTrue;
 
-import java.io.FileInputStream;
+import java.io.InputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 import java.util.Arrays;
 
@@ -113,5 +115,5 @@
     @Test
     public void testMultipolygon() throws Exception {
-        try (FileInputStream in = new FileInputStream(TestUtils.getTestDataRoot() + "multipolygon.osm")) {
+        try (InputStream in = Files.newInputStream(Paths.get(TestUtils.getTestDataRoot(), "multipolygon.osm"))) {
             DataSet ds = OsmReader.parseDataSet(in, null);
             final GeoJSONWriter writer = new GeoJSONWriter(ds);
@@ -126,5 +128,5 @@
     @Test
     public void testMultipolygonRobustness() throws Exception {
-        try (FileInputStream in = new FileInputStream("data_nodist/multipolygon.osm")) {
+        try (InputStream in = Files.newInputStream(Paths.get("data_nodist/multipolygon.osm"))) {
             DataSet ds = OsmReader.parseDataSet(in, null);
             final GeoJSONWriter writer = new GeoJSONWriter(ds);
Index: trunk/test/unit/org/openstreetmap/josm/io/OsmReaderTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/io/OsmReaderTest.java	(revision 15022)
+++ trunk/test/unit/org/openstreetmap/josm/io/OsmReaderTest.java	(revision 15034)
@@ -9,7 +9,8 @@
 
 import java.io.ByteArrayInputStream;
-import java.io.FileInputStream;
 import java.io.InputStream;
 import java.nio.charset.StandardCharsets;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 
 import org.junit.Rule;
@@ -59,5 +60,5 @@
         OsmReader.deregisterPostprocessor(unregistered);
 
-        try (InputStream in = new FileInputStream(TestUtils.getTestDataRoot() + "empty.osm")) {
+        try (InputStream in = Files.newInputStream(Paths.get(TestUtils.getTestDataRoot(), "empty.osm"))) {
             OsmReader.parseDataSet(in, NullProgressMonitor.INSTANCE);
             assertTrue(registered.called);
Index: trunk/test/unit/org/openstreetmap/josm/io/nmea/NmeaReaderTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/io/nmea/NmeaReaderTest.java	(revision 15022)
+++ trunk/test/unit/org/openstreetmap/josm/io/nmea/NmeaReaderTest.java	(revision 15034)
@@ -7,7 +7,8 @@
 
 import java.io.ByteArrayInputStream;
-import java.io.FileInputStream;
 import java.io.IOException;
 import java.nio.charset.StandardCharsets;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
@@ -61,5 +62,5 @@
     public void testReader() throws Exception {
         TimeZone.setDefault(TimeZone.getTimeZone("Europe/Berlin"));
-        final NmeaReader in = new NmeaReader(new FileInputStream("data_nodist/btnmeatrack_2016-01-25.nmea"));
+        final NmeaReader in = new NmeaReader(Files.newInputStream(Paths.get("data_nodist/btnmeatrack_2016-01-25.nmea")));
         in.parse(true);
         assertEquals(30, in.getNumberOfCoordinates());
@@ -87,5 +88,5 @@
     private static void compareWithReference(int ticket, String filename, int numCoor) throws IOException, SAXException {
         GpxData gpx = GpxReaderTest.parseGpxData(TestUtils.getRegressionDataFile(ticket, filename+".gpx"));
-        NmeaReader in = new NmeaReader(new FileInputStream(TestUtils.getRegressionDataFile(ticket, filename+".nmea")));
+        NmeaReader in = new NmeaReader(Files.newInputStream(Paths.get(TestUtils.getRegressionDataFile(ticket, filename+".nmea"))));
         in.parse(true);
         assertEquals(numCoor, in.getNumberOfCoordinates());
Index: trunk/test/unit/org/openstreetmap/josm/tools/GeometryTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/tools/GeometryTest.java	(revision 15022)
+++ trunk/test/unit/org/openstreetmap/josm/tools/GeometryTest.java	(revision 15034)
@@ -7,5 +7,7 @@
 import static org.junit.Assert.assertTrue;
 
-import java.io.FileInputStream;
+import java.io.InputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 import java.util.Arrays;
 import java.util.List;
@@ -78,5 +80,5 @@
     @Test
     public void testClosedWayArea() throws Exception {
-        try (FileInputStream in = new FileInputStream(TestUtils.getTestDataRoot() + "create_multipolygon.osm")) {
+        try (InputStream in = Files.newInputStream(Paths.get(TestUtils.getTestDataRoot(), "create_multipolygon.osm"))) {
             DataSet ds = OsmReader.parseDataSet(in, null);
             Way closedWay = (Way) SubclassFilteredCollection.filter(ds.allPrimitives(),
@@ -94,5 +96,5 @@
     @Test
     public void testMultipolygonArea() throws Exception {
-        try (FileInputStream in = new FileInputStream(TestUtils.getTestDataRoot() + "multipolygon.osm")) {
+        try (InputStream in = Files.newInputStream(Paths.get(TestUtils.getTestDataRoot(), "multipolygon.osm"))) {
             DataSet ds = OsmReader.parseDataSet(in, null);
             final Relation r = ds.getRelations().iterator().next();
@@ -109,5 +111,5 @@
     @Test
     public void testAreaAndPerimeter() throws Exception {
-        try (FileInputStream in = new FileInputStream(TestUtils.getTestDataRoot() + "create_multipolygon.osm")) {
+        try (InputStream in = Files.newInputStream(Paths.get(TestUtils.getTestDataRoot(), "create_multipolygon.osm"))) {
             DataSet ds = OsmReader.parseDataSet(in, null);
             Way closedWay = (Way) SubclassFilteredCollection.filter(ds.allPrimitives(),
