Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update BsnUtil.java #40

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Update BsnUtil.java #40

wants to merge 3 commits into from

Conversation

pvreeuwijk
Copy link

A bsn can be send to 3rd parties who expect a Numeric 8-9 value. eg 005084039 will be send as 5084039. This will be rejected.

assertThat(bsnUtil.testBsn("005084039")).isFalse();

A bsn can be send to 3rd parties who expect a Numeric 8-9 value. eg 005084039 will be send as 5084039. This will be rejected.

assertThat(bsnUtil.testBsn("005084039")).isFalse();
Copy link
Owner

@fhoeben fhoeben left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But are these 3rd parties correct in that the first two digits may not be zeroes? I could not find any documentation of the Dutch government stating this explicitly.

@@ -23,7 +23,7 @@ public String generateBsn() {
int Nr2 = randomUtil.random(10);
int Nr1 = 0;
int SofiNr = 0;
if ((Nr9 == 0) && (Nr8 == 0) && (Nr7 == 0)) {
if (Nr9 == 0 && Nr8 == 0) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you remove the third clause here (I have to admit I don't actually know this generation code very well, but you don't mention this in your PR text).

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pvreeuwijk was this removal intentional? Can you explain to me why this clause should not (or does not have to) be there?

src/main/java/nl/hsac/fitnesse/util/BsnUtil.java Outdated Show resolved Hide resolved
pvreeuwijk and others added 2 commits July 23, 2021 11:51
Co-authored-by: Fried Hoeben <github@hsac.nl>
moved  starts with check "00" next to bsn.length() != 9 check
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants