From 29b5bb41a5318bc8cc83377edf6bb56f39fbf7e0 Mon Sep 17 00:00:00 2001 From: Alexei Barantsev Date: Sat, 3 Mar 2018 10:48:51 +0300 Subject: [PATCH] Fixing use of deprecated API --- .../selenium/environment/webserver/AppServerTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/java/client/test/org/openqa/selenium/environment/webserver/AppServerTest.java b/java/client/test/org/openqa/selenium/environment/webserver/AppServerTest.java index b1b9fb24f5fd7..dfc6edb32c9e0 100644 --- a/java/client/test/org/openqa/selenium/environment/webserver/AppServerTest.java +++ b/java/client/test/org/openqa/selenium/environment/webserver/AppServerTest.java @@ -49,12 +49,12 @@ public class AppServerTest { private static WebDriver driver; @BeforeClass - public static void startDriver() throws Throwable { + public static void startDriver() { driver = new WebDriverBuilder().get(); } @Before - public void startServer() throws Throwable { + public void startServer() { server = new JettyAppServer(); server.start(); } @@ -132,7 +132,7 @@ public void uploadsFile() throws Throwable { String FILE_CONTENTS = "Uploaded file"; File testFile = File.createTempFile("webdriver", "tmp"); testFile.deleteOnExit(); - Files.write(FILE_CONTENTS, testFile, StandardCharsets.UTF_8); + Files.asCharSink(testFile, StandardCharsets.UTF_8).write(FILE_CONTENTS); driver.get(server.whereIs("upload.html")); driver.findElement(By.id("upload")).sendKeys(testFile.getAbsolutePath());