Skip to content

Commit 29b5bb4

Browse files
committed
Fixing use of deprecated API
1 parent f9cba0f commit 29b5bb4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

java/client/test/org/openqa/selenium/environment/webserver/AppServerTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ public class AppServerTest {
4949
private static WebDriver driver;
5050

5151
@BeforeClass
52-
public static void startDriver() throws Throwable {
52+
public static void startDriver() {
5353
driver = new WebDriverBuilder().get();
5454
}
5555

5656
@Before
57-
public void startServer() throws Throwable {
57+
public void startServer() {
5858
server = new JettyAppServer();
5959
server.start();
6060
}
@@ -132,7 +132,7 @@ public void uploadsFile() throws Throwable {
132132
String FILE_CONTENTS = "Uploaded file";
133133
File testFile = File.createTempFile("webdriver", "tmp");
134134
testFile.deleteOnExit();
135-
Files.write(FILE_CONTENTS, testFile, StandardCharsets.UTF_8);
135+
Files.asCharSink(testFile, StandardCharsets.UTF_8).write(FILE_CONTENTS);
136136

137137
driver.get(server.whereIs("upload.html"));
138138
driver.findElement(By.id("upload")).sendKeys(testFile.getAbsolutePath());

0 commit comments

Comments
 (0)