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

Tech debt: refactor URL + Email validation #8531

Closed
poikilotherm opened this issue Mar 24, 2022 · 0 comments · Fixed by #8534
Closed

Tech debt: refactor URL + Email validation #8531

poikilotherm opened this issue Mar 24, 2022 · 0 comments · Fixed by #8534
Milestone

Comments

@poikilotherm
Copy link
Contributor

While hacking on Jakarta + Payara 6 compatibility #8305 , I came across these errors (see screenshot).

grafik

Let's fix this:

  • Move email + url validation classes and annotations to sub packages (where they belong...), refactor using code to reflect the relocation (7 classes)
  • Make the Validator classes less complicated (some strange constructions in URLValidator with NPE etc????)
  • Make the messages come from ValidationMessages.properties via standard mechanisms instead of Bundle.properties
  • Fix the tests to not use internal classes but use the standard ways of testing ConstraintValidations
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Mar 24, 2022
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Mar 24, 2022
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Mar 24, 2022
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Mar 24, 2022
- Simplify the code for URLValidator
- Make it nullsafe
- Make allowed schemes configurable from annotation
- Rewrite tests to JUnit5, more examples and test with real subject
  classes
- Move message string to validation bundle
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Mar 24, 2022
- Reuse existing constraints instead of creating our own validator
- Provide programmatic method to use the same from code like OAuth2 etc
- Add much more tests, also for actual bean validation
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Mar 25, 2022
@pdurbin pdurbin added this to the 5.11 milestone Apr 12, 2022
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 a pull request may close this issue.

2 participants