meilisearch / meilisearch/meilisearch-java
Type safety Warning on `Result` class
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 245
- Forks
- 152
- PR merge metrics
- No merged PRs in 30d
Description
Description
Type safety is not applied when decoding the Result class throught the JSON handler in the method getKeys() and getTasks()
Result<Key> result = httpClient.get(urlPath, Result.class, Key.class);
Result<Task> result = httpClient.get(urlPath, Result.class, Task.class);
This warning is thrown:
Type safety: The expression of type Result needs unchecked conversion to conform to Result<Key>Java(16777748)
Notes
This issue should be implemented before the resolution of #420
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the getKeys() and getTasks() entry points and inspect the JSON handler's decoding of Result.class with Key.class and Task.class. Check how the Result type is declared and how #420 affects the work; done means the unchecked conversion warning is resolved while both results remain correctly typed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100