Skip to content

Fix error on code completion for SQL file with unrecognized DAO method #395

@xterao

Description

@xterao

Describe the bug
When invoking code completion on an SQL file where the corresponding DAO method is not recognized, an error occurs when trying to retrieve the first element from an empty list during the suggestion of the top binding variable.

This issue may also occur if the DAO class file is not located within the source directory or in cases such as creating a temporary SQL file.

Expected behavior
The pre-check for the DAO method should be modified so that, if the list is empty, subsequent processing is skipped, preventing the error.

Desktop :

  • IDEA Version: 2024.3.6
  • Doma Tools Version: 2.0.0

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions