Merge branch 'stable-2.12' into stable-2.13

* stable-2.12:
  Fix the DiffPreference and EditPreference dialogs on diffs and edits
  OutgoingEmailValidator: Revert back to using static initialization

Change-Id: I59af6cff20fba872435d26d120b2bf90ca551c9a
This commit is contained in:
Hugo Arès
2016-09-12 10:16:31 -04:00
3 changed files with 7 additions and 8 deletions

View File

@@ -32,7 +32,8 @@ limitations under the License.
color: #ffffff;
font-family: arial,sans-serif;
font-weight: bold;
overflow: hidden;
overflow: auto !important;
bottom: 0;
text-align: left;
text-shadow: 1px 1px 7px #000000;
min-width: 300px;

View File

@@ -32,7 +32,8 @@ limitations under the License.
color: #ffffff;
font-family: arial,sans-serif;
font-weight: bold;
overflow: hidden;
overflow: auto !important;
bottom: 0;
text-align: left;
text-shadow: 1px 1px 7px #000000;
min-width: 300px;

View File

@@ -19,15 +19,12 @@ import static org.apache.commons.validator.routines.DomainValidator.ArrayType.GE
import org.apache.commons.validator.routines.DomainValidator;
import org.apache.commons.validator.routines.EmailValidator;
import java.util.concurrent.atomic.AtomicBoolean;
public class OutgoingEmailValidator {
private static final AtomicBoolean initialized = new AtomicBoolean(false);
public static boolean isValid(String addr) {
if (!initialized.getAndSet(true)) {
static {
DomainValidator.updateTLDOverride(GENERIC_PLUS, new String[]{"local"});
}
public static boolean isValid(String addr) {
return EmailValidator.getInstance(true, true).isValid(addr);
}
}