Skip to content

fix/issue 4#9

Merged
dieppa merged 2 commits into
masterfrom
fix/issue_4
Feb 27, 2026
Merged

fix/issue 4#9
dieppa merged 2 commits into
masterfrom
fix/issue_4

Conversation

@dieppa

@dieppa dieppa commented Feb 27, 2026

Copy link
Copy Markdown
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 dieppa merged commit 79eaef7 into master Feb 27, 2026
3 of 4 checks passed
@dieppa dieppa deleted the fix/issue_4 branch February 27, 2026 15:59
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant