Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
This patch reorganizes some of the code around the validator.
The previous version uses different classes for Writer and ValidatingWriter, and Reader and ValidatingReader.
These types have been redefined respectively as WriterImpl<NullValidator> and WriterImpl<Validator>, and ReaderImpl<NullValidator> and ReaderImpl<Validator>. The compiler generates 4 types, but the NullValidator compiles away as no-ops, creating essentially the same classes as before. This allows logic to exist in single class definitions instead of duplicates.
Also, in the Validator some special logic was removed for records, now instead sharing code with the other compound types.