meilisearch-java
meilisearch-java copied to clipboard
Type safety Warning on `Result` class
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
Hi Can I contribute trying t debug this?
Hi @ancatoza, Yes of course with pleasure 😊
hi :) I'll start working on this issue inmediately, can you please confirm that the following path is the correct one? meilisearch-java/src/main/java/com/meilisearch/sdk/model/Results.java
As stated in the issue, the warning is displayed in these two classes:
in the method getKeys() and getTasks()
So respectively, in the files TasksHandler.java
and KeysHandler.java
. But I'm pretty sure the main problem comes with how types are processed in the JsonHandler
from decode
method.