Skip to content

Commit 0238f2b

Browse files
committed
Equality is not defined for profiles. So we can only keep old or reset. Let's reset.
1 parent b2ed531 commit 0238f2b

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

java/client/src/org/openqa/selenium/firefox/FirefoxOptions.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import static org.openqa.selenium.firefox.FirefoxDriver.BINARY;
2222
import static org.openqa.selenium.firefox.FirefoxDriver.PROFILE;
2323

24-
import com.google.common.base.Preconditions;
2524
import com.google.common.collect.ImmutableList;
2625
import com.google.gson.JsonArray;
2726
import com.google.gson.JsonElement;
@@ -139,9 +138,6 @@ public FirefoxOptions setProfile(FirefoxProfile profile) {
139138

140139
// Confusing API. Keeping package visible only
141140
FirefoxOptions setProfileSafely(FirefoxProfile profile) {
142-
Preconditions.checkState(
143-
this.profile == null || this.profile.equals(profile),
144-
"Profile passed to options is different from existing profile that has been set.");
145141
if (profile == null) {
146142
return this;
147143
}

0 commit comments

Comments
 (0)