fix/issue 4#9
Merged
Merged
Conversation
dieppa
commented
Feb 27, 2026
Member
- fix: add missing type checks to parameter validators
- chore: claude for commits
Add instanceof type checks to 3 validators that only checked parameter existence but not type (filter in Update/Delete, keys/indexName in DropIndex). Also add options type validation to the 5 validators for operations that support options (Insert, Update, CreateIndex, CreateView, RenameCollection). This closes the remaining ClassCastException gaps in MongoOperation getters — since validate() runs at load time via the TemplatePayload contract, the @SuppressWarnings("unchecked") casts are now effectively safe. Resolves ANALYSIS.md issue #4.
dieppa
added a commit
that referenced
this pull request
Feb 27, 2026
Add instanceof type checks to 3 validators that only checked parameter existence but not type (filter in Update/Delete, keys/indexName in DropIndex). Also add options type validation to the 5 validators for operations that support options (Insert, Update, CreateIndex, CreateView, RenameCollection). This closes the remaining ClassCastException gaps in MongoOperation getters — since validate() runs at load time via the TemplatePayload contract, the @SuppressWarnings("unchecked") casts are now effectively safe.
dieppa
added a commit
that referenced
this pull request
Feb 27, 2026
- #10: Remove duplicate logger in CreateCollectionOperator that shadowed the parent's MongoOperator.logger - #6: Remove redundant session warning blocks from CreateCollectionOperator and CreateIndexOperator; all DDL operators now rely on base class logging - #7: Fix collation mapping for YAML input by adding Map-to-Collation conversion in MapperUtil.getCollation() with all 9 builder fields - #8: Add multi parameter support to DeleteOperator (default false = deleteOne, matching MongoDB native default and UpdateOperator pattern) - #9: Reject unrecognized parameter keys via checkUnrecognizedKeys() utility in OperationValidator, applied to all 7 non-NO_OP validators
dieppa
added a commit
that referenced
this pull request
Feb 27, 2026
- issue-10: Remove duplicate logger in CreateCollectionOperator that shadowed the parent's MongoOperator.logger - issue-6: Remove redundant session warning blocks from CreateCollectionOperator and CreateIndexOperator; all DDL operators now rely on base class logging - issue-7: Fix collation mapping for YAML input by adding Map-to-Collation conversion in MapperUtil.getCollation() with all 9 builder fields - issue-8: Add multi parameter support to DeleteOperator (default false = deleteOne, matching MongoDB native default and UpdateOperator pattern) - issue-9: Reject unrecognized parameter keys via checkUnrecognizedKeys() utility in OperationValidator, applied to all 7 non-NO_OP validators
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.