- Timestamp:
- 2016-05-13T04:20:36+02:00 (9 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/routines/EmailValidator.java
r9997 r10202 73 73 private static final EmailValidator EMAIL_VALIDATOR_WITH_LOCAL = new EmailValidator(true, false); 74 74 75 76 /**77 * Singleton instance of this class, which does78 * consider local addresses valid.79 */80 private static final EmailValidator EMAIL_VALIDATOR_WITH_LOCAL_WITH_TLD = new EmailValidator(true, true);81 82 75 /** 83 76 * Returns the Singleton instance of this validator. … … 99 92 public static EmailValidator getInstance(boolean allowLocal, boolean allowTld) { 100 93 if (allowLocal) { 101 if (allowTld) { 102 return EMAIL_VALIDATOR_WITH_LOCAL_WITH_TLD; 103 } else { 104 return EMAIL_VALIDATOR_WITH_LOCAL; 105 } 94 return EMAIL_VALIDATOR_WITH_LOCAL; 106 95 } else { 107 96 if (allowTld) { -
trunk/test/unit/org/openstreetmap/josm/data/osm/visitor/MergeSourceBuildingVisitorTest.java
r9214 r10202 13 13 import org.openstreetmap.josm.JOSMFixture; 14 14 import org.openstreetmap.josm.data.coor.LatLon; 15 import org.openstreetmap.josm.data.osm.Changeset; 15 16 import org.openstreetmap.josm.data.osm.DataSet; 16 17 import org.openstreetmap.josm.data.osm.Node; … … 409 410 assertTrue(r2.getMembers().contains(new RelationMember("relation-1", r1))); 410 411 } 412 413 /** 414 * Unit test of {@code AbstractVisitor#visit(org.openstreetmap.josm.data.osm.Changeset)}. 415 */ 416 @Test 417 public void testVisitChangeset() { 418 new MergeSourceBuildingVisitor(new DataSet()).visit(new Changeset()); 419 } 411 420 } -
trunk/test/unit/org/openstreetmap/josm/data/validation/routines/EmailValidatorTest.java
r10133 r10202 60 60 public void testEmail() { 61 61 assertTrue(validator.isValid("jsmith@apache.org")); 62 assertFalse(validator.isValid(null)); 62 63 } 63 64
Note:
See TracChangeset
for help on using the changeset viewer.