[java] Refactoring, code simplification
@@ -86,15 +86,9 @@ public EdgeOptions setChromium(boolean useChromium) {
@Override
public void setCapability(String key, Object value) {
- switch (key) {
- case USE_CHROMIUM:
- if (value instanceof Boolean) {
+ if (USE_CHROMIUM.equals(key) && value instanceof Boolean) {
useChromium = (Boolean) value;
}
- break;
- default:
- // Do nothing
- }
super.setCapability(key, value);
}
}
