Skip to content

Commit

Permalink
[java] Using SDK instead of guava (and deleting unnecessary boxing)
Browse files Browse the repository at this point in the history
  • Loading branch information
barancev committed Sep 26, 2019
1 parent 5097728 commit 638815a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions java/client/src/org/openqa/selenium/firefox/Preferences.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
import com.google.common.annotations.VisibleForTesting;
import com.google.common.io.CharStreams;
import com.google.common.io.Closeables;
import com.google.common.io.LineReader;

import org.openqa.selenium.WebDriverException;
import org.openqa.selenium.json.Json;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
Expand Down Expand Up @@ -100,7 +100,7 @@ private void readDefaultPreferences(Reader defaultsReader) {
String key = entry.getKey();
Object value = entry.getValue();
if (value instanceof Long) {
value = new Integer(((Long)value).intValue());
value = ((Long) value).intValue();
}
setPreference(key, value);
immutablePrefs.put(key, value);
Expand All @@ -110,7 +110,7 @@ private void readDefaultPreferences(Reader defaultsReader) {
for (Map.Entry<String, Object> entry : mutable.entrySet()) {
Object value = entry.getValue();
if (value instanceof Long) {
value = new Integer(((Long)value).intValue());
value = ((Long) value).intValue();
}
setPreference(entry.getKey(), value);
}
Expand All @@ -130,7 +130,7 @@ private void setPreference(String key, Object value) {
}

private void readPreferences(Reader reader) throws IOException {
LineReader allLines = new LineReader(reader);
BufferedReader allLines = new BufferedReader(reader);
String line = allLines.readLine();
while (line != null) {
Matcher matcher = PREFERENCE_PATTERN.matcher(line);
Expand Down

0 comments on commit 638815a

Please sign in to comment.