Replace `noinspection` instruction with proper `@SuppressWarnings` annotation

`//noinspection unchecked` suppresses unchecked cast warning only in the IDE. `@SuppressWarning` annotation properly suppresses both IDE and the compiler warnings.
This commit is contained in:
Vyacheslav 2024-02-11 02:58:09 +04:00 committed by Aliaksei Levin
parent d93a99e335
commit d0ff90bb19
1 changed files with 1 additions and 1 deletions

View File

@ -119,12 +119,12 @@ public final class Client {
* @return request result.
* @throws ExecutionException if query execution fails.
*/
@SuppressWarnings("unchecked")
public static <T extends TdApi.Object> T execute(TdApi.Function<T> query) throws ExecutionException {
TdApi.Object object = nativeClientExecute(query);
if (object instanceof TdApi.Error) {
throw new ExecutionException((TdApi.Error) object);
}
//noinspection unchecked
return (T) object;
}