rubenlagus / TelegramBots

Java library to create bots using Telegram Bots API
https://telegram.me/JavaBotsApi
MIT License
4.79k stars 1.23k forks source link

Fix argument passing in DefaultAbilities.java #1444

Closed panic08 closed 3 days ago

panic08 commented 1 month ago

Here we fix a compiler warning related to ambiguous passing of arguments to the getLocalizedMessage() method. I have cast the args argument array to type Object[] to explicitly state that each element should be passed as a separate argument in a method with a variable number of arguments. This improves code readability and prevents potential problems with argument passing. Compiler warnings no longer occur after the changes have been made