meilisearch / meilisearch/meilisearch-java

Client methods that return Boolean should return primitive and various invalid string comparisons

Open
#967 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
245
Forks
152
PR merge metrics
No merged PRs in 30d

Description

Description

  • The Client class has various methods that return Boolean, but there is no real reason to return an object. THe methods should return primitive boolean.
  • At various points strings are tested for "" using the == operator, which is not valid. equals or isEmpty should be used.

Expected behavior
No behavior anomalies, just best practices.

Current behavior
n/a

Screenshots or Logs
n/a

Environment (please complete the following information):

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Client class and searching its methods for Boolean return types and string comparisons with "" using ==. Update the identified methods and comparisons, then run the project's existing test suite and confirm behavior remains unchanged while methods return primitive boolean values.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.