json_schema
json_schema copied to clipboard
Avoid nullable `schemaPath` and `instancePath`
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
schemaPathorinstancePathmay 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
ValidationErrormay rely oninstancePathandschemaPathbeing nullable. However:- It's unlikely that implementing
ValidationErroris common (the constructor is private, so it was probably not intended for subclassing). ValidationErrorshould probably be a made afinal class ValidationError.
- It's unlikely that implementing
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.yamlcoverage of security relevant code
Questions or Comments? Reach out on Slack: #support-infosec.
@Workiva/release-management-p