java.nio.file.Paths



API Populatity

46 Client projects

Project: java

Package: java.nio

Project SonarSource/sonarqube in file ...art.src.main.java.org.sonar.start.StartServer.java (2014-07-10)
@@ -28,6 +28,7 @@ import org.sonar.process.ProcessWrapper;
 import java.io.IOException;
 import java.net.DatagramSocket;
 import java.net.URISyntaxException;
+import java.nio.file.Paths;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 import java.util.concurrent.TimeUnit;
@@ -92,6 +93,6 @@ public final class StartServer {
   }
 
   public static void main(String... args) throws InterruptedException, IOException, URISyntaxException {
-    new StartServer(new Env()).start();
+    new StartServer(new Env(Paths.get(".").toFile())).start();
   }
 }
\ No newline at end of file
Project crate/crate in file ...ation.collect.MapSideDataCollectOperationTest.java (2015-02-04)
@@ -42,6 +42,7 @@ import org.mockito.Answers;
 
 import java.io.File;
 import java.io.FileWriter;
+import java.nio.file.Paths;
 import java.util.Arrays;
 import java.util.HashMap;
 import java.util.Map;
@@ -105,7 +106,7 @@ public class MapSideDataCollectOperationTest {
         FileUriCollectNode collectNode = new FileUriCollectNode(
                 "test",
                 routing,
-                Literal.newLiteral(tmpFile.getAbsolutePath()),
+                Literal.newLiteral(Paths.get(tmpFile.toURI()).toUri().toString()),
                 Arrays.<Symbol>asList(
                         createReference("name", DataTypes.STRING),
                         createReference(new ColumnIdent("details", "age"), DataTypes.INTEGER)
Project elasticsearch/elasticsearch in file ...bwcompat.StaticIndexBackwardCompatibilityTest.java (2014-12-09)
@@ -35,6 +35,7 @@ import org.elasticsearch.test.rest.client.http.HttpRequestBuilder;
 
 import java.io.File;
 import java.net.InetSocketAddress;
+import java.nio.file.Paths;
 
 import static org.hamcrest.Matchers.greaterThanOrEqualTo;
 
@@ -48,7 +49,7 @@ public class StaticIndexBackwardCompatibilityTest extends ElasticsearchIntegrati
 
     public void loadIndex(String index, Object... settings) throws Exception {
         logger.info("Checking static index " + index);
-        Settings nodeSettings = prepareBackwardsDataDir(new File(getClass().getResource(index).toURI()), settings);
+        Settings nodeSettings = prepareBackwardsDataDir(Paths.get(getClass().getResource(index).toURI()), settings);
         internalCluster().startNode(nodeSettings);
         ensureGreen("test");
         assertIndexSanity();