Skip to content

Commit fb584d4

Browse files
author
Burak Kaygusuz
committed
refactor(browser): use Map.ofEntries() for creating multi-pair immutable maps
1 parent d196474 commit fb584d4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/main/java/io/github/burakkaygusuz/config/Browser.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ public enum Browser {
1616
CHROME {
1717
@Override
1818
protected ChromeOptions getOptions() {
19-
Map<String, Object> prefs = new HashMap<>();
20-
prefs.put("profile.default_content_setting_values.notifications", 2);
21-
prefs.put("profile.managed_default_content_settings.javascript", 1);
22-
prefs.put("credentials_enable_service", false);
23-
prefs.put("profile.password_manager_enabled", false);
19+
Map<String, Object> prefs = Map.ofEntries(
20+
Map.entry("profile.default_content_setting_values.notifications", 2),
21+
Map.entry("profile.managed_default_content_settings.javascript", 1),
22+
Map.entry("credentials_enable_service", false),
23+
Map.entry("profile.password_manager_enabled", false));
2424

2525
final ChromeOptions chromeOptions = new ChromeOptions();
2626
chromeOptions

0 commit comments

Comments
 (0)