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:
@@ -32,7 +32,8 @@ limitations under the License.
|
|||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
font-family: arial,sans-serif;
|
font-family: arial,sans-serif;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
overflow: hidden;
|
overflow: auto !important;
|
||||||
|
bottom: 0;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
text-shadow: 1px 1px 7px #000000;
|
text-shadow: 1px 1px 7px #000000;
|
||||||
min-width: 300px;
|
min-width: 300px;
|
||||||
|
|||||||
@@ -32,7 +32,8 @@ limitations under the License.
|
|||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
font-family: arial,sans-serif;
|
font-family: arial,sans-serif;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
overflow: hidden;
|
overflow: auto !important;
|
||||||
|
bottom: 0;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
text-shadow: 1px 1px 7px #000000;
|
text-shadow: 1px 1px 7px #000000;
|
||||||
min-width: 300px;
|
min-width: 300px;
|
||||||
|
|||||||
@@ -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.DomainValidator;
|
||||||
import org.apache.commons.validator.routines.EmailValidator;
|
import org.apache.commons.validator.routines.EmailValidator;
|
||||||
|
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
|
||||||
|
|
||||||
public class OutgoingEmailValidator {
|
public class OutgoingEmailValidator {
|
||||||
private static final AtomicBoolean initialized = new AtomicBoolean(false);
|
static {
|
||||||
|
|
||||||
public static boolean isValid(String addr) {
|
|
||||||
if (!initialized.getAndSet(true)) {
|
|
||||||
DomainValidator.updateTLDOverride(GENERIC_PLUS, new String[]{"local"});
|
DomainValidator.updateTLDOverride(GENERIC_PLUS, new String[]{"local"});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean isValid(String addr) {
|
||||||
return EmailValidator.getInstance(true, true).isValid(addr);
|
return EmailValidator.getInstance(true, true).isValid(addr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user