«Произошла недопустимая операция доступа с отражением» в Telegram Bot Java - PullRequest
0 голосов
/ 02 мая 2020

Когда я пытаюсь запустить свой код, он выдает мне следующее предупреждение:

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/C:/Users/user/.m2/repository/com/google/inject/guice/4.2.2/guice-4.2.2.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

Кстати, все это работает, но я хочу скрыть это предупреждение, как я могу это сделать?

1 Ответ

0 голосов
/ 02 мая 2020

Первые три предупреждения говорят о том, что привязка slf4j не найдена, добавьте реализацию slf4j: см. http://www.slf4j.org/manual.html

Другое относится к хитрости. Для получения дополнительной информации см https://github.com/google/guice/issues/1133

...