Skip to content

Commit d0ff90b

Browse files
vkryllevlam
authored andcommitted
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.
1 parent d93a99e commit d0ff90b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

example/java/org/drinkless/tdlib/Client.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,12 @@ public void send(TdApi.Function query, ResultHandler resultHandler) {
119119
* @return request result.
120120
* @throws ExecutionException if query execution fails.
121121
*/
122+
@SuppressWarnings("unchecked")
122123
public static <T extends TdApi.Object> T execute(TdApi.Function<T> query) throws ExecutionException {
123124
TdApi.Object object = nativeClientExecute(query);
124125
if (object instanceof TdApi.Error) {
125126
throw new ExecutionException((TdApi.Error) object);
126127
}
127-
//noinspection unchecked
128128
return (T) object;
129129
}
130130

0 commit comments

Comments
 (0)