Skip to content

Commit

Permalink
[java] Removing unnecessary unboxing
Browse files Browse the repository at this point in the history
  • Loading branch information
barancev committed Oct 1, 2019
1 parent f2555ad commit cc2ae02
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 @@ -119,11 +119,11 @@ public void setPreference(String key, Object value) {
String.format("Preference values must be plain strings: %s: %s",
key, value));
}
allPrefs.put(key, (String) value);
} else if (value instanceof Boolean) {
allPrefs.put(key, ((Boolean) value).booleanValue());
} else {
allPrefs.put(key, value);
} else if (value instanceof Number) {
allPrefs.put(key, ((Number) value).intValue());
} else {
allPrefs.put(key, value);
}
}

Expand Down

0 comments on commit cc2ae02

Please sign in to comment.