Skip to content

Commit

Permalink
Legg til støtte for å ha et classpath-flagg for å aktivere syntetiske…
Browse files Browse the repository at this point in the history
… brukere.

Flagget kan f.eks legges i /src/test/resources
  • Loading branch information
eivinhb committed Oct 29, 2020
1 parent 5770210 commit 86f020b
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;
import java.net.URL;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
Expand Down Expand Up @@ -43,6 +44,13 @@ public class FodselsnummerValidator extends StringNumberValidator implements Con
*/
public static boolean ALLOW_SYNTHETIC_NUMBERS = false;

static {
final URL flag = FodselsnummerValidator.class.getResource("/no.bekk.bekkopen.person.allow_synthetic_numbers.flag");
if (flag != null) {
ALLOW_SYNTHETIC_NUMBERS = true;
}
}

/**
* Returns an object that represents a Fodselsnummer.
*
Expand Down

0 comments on commit 86f020b

Please sign in to comment.