Skip to content

Commit

Permalink
Removing deprecated code
Browse files Browse the repository at this point in the history
  • Loading branch information
barancev committed May 15, 2013
1 parent f59de65 commit 5266e09
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 49 deletions.
2 changes: 1 addition & 1 deletion .idea/libraries/operadriver.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 0 additions & 48 deletions java/client/src/org/openqa/selenium/UnhandledAlertException.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@

package org.openqa.selenium;

import org.openqa.selenium.security.Credentials;

import java.io.Serializable;

public class UnhandledAlertException extends WebDriverException {

private final String alertText;
Expand All @@ -40,48 +36,4 @@ public UnhandledAlertException(String commandName, String alertText) {
public String getAlertText() {
return alertText;
}

/**
* Returns null if alert text could not be retrieved.
* @deprecated To be removed in 2.31, use {@link #getAlertText()} instead.
*/
@Deprecated
public Alert getAlert() {
return new LocallyStoredAlert(alertText);
}

private static class LocallyStoredAlert implements Alert, Serializable {
private static final long serialVersionUID = 1L;

private final String alertText;

public LocallyStoredAlert(String alertText) {
this.alertText = alertText;
}

public void dismiss() {
throwAlreadyDismissed();
}

public void accept() {
throwAlreadyDismissed();
}

public String getText() {
return this.alertText;
}

public void sendKeys(String keysToSend) {
throwAlreadyDismissed();
}

@Override
public void authenticateUsing(Credentials credentials) {
throwAlreadyDismissed();
}

private void throwAlreadyDismissed() {
throw new UnsupportedOperationException("Alert was already dismissed");
}
}
}

0 comments on commit 5266e09

Please sign in to comment.