Skip to content

Conversation

@sdumitriu
Copy link
Member

No description provided.

Copy link
Contributor

@rombert rombert left a comment

Choose a reason for hiding this comment

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

Thanks for the PR @sdumitriu and sorry for taking so long to review.

It's not immediately obvious to me why the change is needed, can you please explain that? I suspect that the scenario that you are hitting is when oldValues is empty ( declared restriction with no values ) and newValues is null ( restriction is not declared ).

I wonder then if from a JCR point of view it makes sense to treat restrictions with no value as different from missing restrictions.

@anchela - any thoughts on this?

@anchela
Copy link
Contributor

anchela commented Aug 14, 2024

@rombert , i vaguely remember that there was some trouble in the past on how to reflect empty values for restrictions in the past. for some like the glob-style or rep:current restrictions an empty value (or empty values for mv restrictions) has a meaning while null values for properties in JCR default writing are equivalent to removal.

i guess some additional tests would be good to illustrate the problem and the intended fix. they should also over the empty value scenario (unless that already exists). hope that helps.

@rombert
Copy link
Contributor

rombert commented Aug 14, 2024

@rombert , i vaguely remember that there was some trouble in the past on how to reflect empty values for restrictions in the past. for some like the glob-style or rep:current restrictions an empty value (or empty values for mv restrictions) has a meaning while null values for properties in JCR default writing are equivalent to removal.

i guess some additional tests would be good to illustrate the problem and the intended fix. they should also over the empty value scenario (unless that already exists). hope that helps.

Thanks @anchela , so the distinction is indeed relevant. I agree that additional tests would help.

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
33.3% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

1 similar comment
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
33.3% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

@anchela
Copy link
Contributor

anchela commented Oct 29, 2024

@sdumitriu , please provide additional test-coverage for the proposed changes

33.3% Coverage on New Code (required ≥ 80%)

i would actually go for 100% coverage for the new changes.
it's about permission setup so any glitch will negatively impact customers and there is no easy way to fix broken setup.

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
33.3% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

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.

3 participants