Skip to content

Incorrect empty string comparisons in Client.java #999

Description

@fallingrock

Description
The generateTenantToken method in Client.java uses == to compare a variable to an empty string. This is not correct because == tests object references not object content.

Expected behavior
To test for an empty string .isEmpty() should be used.

Current behavior
String comparisons will always return false.

Environment (please complete the following information):

  • OS: n/a
  • Meilisearch version: n/a
  • meilisearch-java version: 0.22.1

Activity

  1. added theissue type on Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions