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

refactored copySchemaResources with polymorphism #1006

Closed meer1616 closed 3 months ago

meer1616 commented 3 months ago

The conditional logic in copySchemaResources method has been replaced with polymorphic behavior. Each type of resource copying is now handled by a separate subclass of ResourceCopier, promoting cleaner code and easier maintenance.

justin-tay commented 3 months ago

This is not how polymorphism works and this increases garbage collection for no benefit.