networknt / json-schema-validator

A fast Java JSON schema validator that supports draft V4, V6, V7, V2019-09 and V2020-12
Apache License 2.0
807 stars 320 forks source link

Check type validator is of correct class #1003

Closed justin-tay closed 3 months ago

justin-tay commented 3 months ago

Explicitly check that the type validator is of type TypeValidator before using to prevent a java.lang.ClassCastException in the event a meta-schema uses a different validator for instance if the standard validation vocab isn't used.

codecov-commenter commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 78.80%. Comparing base (61323ba) to head (bde0500).

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1003 +/- ## ========================================= Coverage 78.79% 78.80% - Complexity 1959 1960 +1 ========================================= Files 172 172 Lines 6344 6345 +1 Branches 1252 1253 +1 ========================================= + Hits 4999 5000 +1 Misses 876 876 Partials 469 469 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.