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

Avoid nullable schemaPath and instancePath #197

Merged
merged 1 commit into from
Oct 17, 2024

Conversation

jonasfj
Copy link

@jonasfj jonasfj commented Sep 21, 2024

Ultimate problem:

schemaPath and instancePath on ValidationError is never null, so users shouldn't need to check for null.

How it was fixed:

schemaPath and instancePath was made non-nullable.

Testing suggestions:

N/A.

Potential areas of regression:

nits:

  • Users who access schemaPath or instancePath may get a warning, if they were doing null checks (most probably where). This warning is likely harmless and easy to fix by removing the unnecessary null check.
  • Users who made a class that implements ValidationError may rely on instancePath and schemaPath being nullable.
    However:
    • It's unlikely that implementing ValidationError is common (the constructor is private, so it was probably not intended for subclassing).
    • ValidationError should probably be a made a final class ValidationError.

@aviary-wf
Copy link

Security Insights

No security relevant content was detected by automated scans.

Action Items

  • Review PR for security impact; comment "security review required" if needed or unsure
  • Verify aviary.yaml coverage of security relevant code

Questions or Comments? Reach out on Slack: #support-infosec.

Copy link

@michaelcarter-wf michaelcarter-wf left a comment

Choose a reason for hiding this comment

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

+1

@michaelcarter-wf
Copy link

@Workiva/release-management-p

Copy link

@rmconsole-wf rmconsole-wf left a comment

Choose a reason for hiding this comment

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

+1 from RM

@rm-astro-wf rm-astro-wf merged commit 2f8c56e into Workiva:master Oct 17, 2024
4 checks passed
@jonasfj jonasfj deleted the avoid-nullable-paths branch October 18, 2024 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants