Skip to content

Conversation

@xterao
Copy link
Collaborator

@xterao xterao commented Aug 8, 2025

This update addresses the following issues in the annotation option checking functionality:

  • Primitive type property handling
    Fixed a bug where specifying a primitive type property in include or exclude options would incorrectly trigger an error.

  • Property access on primitive types
    Added a dedicated error message when a property access is performed on a primitive type (e.g., attempting to reference a sub-property of an int).

  • Non-array option value support
    Enhanced parsing to correctly handle cases where include or exclude values are provided as a single string instead of an array.

@xterao xterao self-assigned this Aug 8, 2025
@xterao xterao requested a review from Copilot August 8, 2025 07:29
@xterao xterao added this to the 2.1.0 Release milestone Aug 8, 2025
@github-actions github-actions bot added the fix Bug fixes label Aug 8, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes three issues in the annotation option validation functionality for Doma tools: primitive type property handling, property access validation on primitive types, and non-array option value support.

  • Fixed bug where primitive type properties in include/exclude options incorrectly triggered errors
  • Added dedicated error message for property access attempts on primitive types
  • Enhanced parsing to handle single string values instead of only arrays for include/exclude options

Reviewed Changes

Copilot reviewed 21 out of 33 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/main/kotlin/.../DaoAnnotationOptionParameterCheckProcessor.kt Core logic fixes for option validation including primitive type handling and single string parsing
src/main/kotlin/.../ValidationAnnotationOptionPrimitiveFieldResult.kt New validation result class for primitive field access errors
src/main/kotlin/.../PsiParameterExtension.kt Fixed parameter type access using type instead of typeElement?.type
src/main/kotlin/.../PsiMethodExtension.kt Enhanced parameter finding to exclude ignored parameter types
src/main/resources/messages/DomaToolsBundle*.properties Added error message for primitive field access validation
Test files Comprehensive test data and test cases for the new functionality

@xterao xterao merged commit 3b89ec3 into main Aug 8, 2025
5 checks passed
@xterao xterao deleted the fix/check-annotation-option-primitive-property branch August 8, 2025 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Do Not Trigger Error When Primitive Types Are Specified in Annotation Options

2 participants