EmailIT: Use String#replace method instead String#replaceAll
String#replaceAll uses a regular expression when searching targets which is not needed to replace '@'. Change-Id: I0b109ab61545648f1c62dd5f9b238de3f78ff0cf Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
@@ -42,7 +42,7 @@ public class EmailIT extends AbstractDaemonTest {
|
||||
String email = "foo.bar2@example.com";
|
||||
assertThat(getEmails()).doesNotContain(email);
|
||||
|
||||
createEmail(email.replaceAll("@", "%40"));
|
||||
createEmail(email.replace("@", "%40"));
|
||||
assertThat(getEmails()).contains(email);
|
||||
}
|
||||
|
||||
@@ -67,8 +67,7 @@ public class EmailIT extends AbstractDaemonTest {
|
||||
createEmail(email);
|
||||
assertThat(getEmails()).contains(email);
|
||||
|
||||
RestResponse r =
|
||||
adminRestSession.delete("/accounts/self/emails/" + email.replaceAll("@", "%40"));
|
||||
RestResponse r = adminRestSession.delete("/accounts/self/emails/" + email.replace("@", "%40"));
|
||||
r.assertNoContent();
|
||||
assertThat(getEmails()).doesNotContain(email);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user