All warnings (12) | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Unconditional wait
(WaitUnconditional [x])
|
Unconditional BotSession.access$700() call in BotSession.HandlerThread.run().
|
||||||||||||
This method contains a call to
BotSession.access$700() which is not guarded by conditional control flow. The code should verify that condition it intends to wait for is not already satisfied before calling wait; any previous notifications will be ignored. |
|||||||||||||
Method with Boolean return type returns explicit null
(BooleanReturnNull [x])
|
Method AnswerCallbackQuery.deserializeResponse() with Boolean return type returns null.
|
||||||||||||
A method that returns either
Boolean.TRUE , Boolean.FALSE or null is an accident waiting to happen. This method can be invoked as though it returned a value of type boolean,
and the compiler will insert automatic unboxing of the Boolean value. If a null value is returned, this will result in a NullPointerException . |
|||||||||||||
Method with Boolean return type returns explicit null
(BooleanReturnNull [x])
|
Method AnswerInlineQuery.deserializeResponse() with Boolean return type returns null.
|
||||||||||||
A method that returns either
Boolean.TRUE , Boolean.FALSE or null is an accident waiting to happen. This method can be invoked as though it returned a value of type boolean,
and the compiler will insert automatic unboxing of the Boolean value. If a null value is returned, this will result in a NullPointerException . |
|||||||||||||
Method with Boolean return type returns explicit null
(BooleanReturnNull [x])
|
Method KickChatMember.deserializeResponse() with Boolean return type returns null.
|
||||||||||||
A method that returns either
Boolean.TRUE , Boolean.FALSE or null is an accident waiting to happen. This method can be invoked as though it returned a value of type boolean,
and the compiler will insert automatic unboxing of the Boolean value. If a null value is returned, this will result in a NullPointerException . |
|||||||||||||
Method with Boolean return type returns explicit null
(BooleanReturnNull [x])
|
Method LeaveChat.deserializeResponse() with Boolean return type returns null.
|
||||||||||||
A method that returns either
Boolean.TRUE , Boolean.FALSE or null is an accident waiting to happen. This method can be invoked as though it returned a value of type boolean,
and the compiler will insert automatic unboxing of the Boolean value. If a null value is returned, this will result in a NullPointerException . |
|||||||||||||
Method with Boolean return type returns explicit null
(BooleanReturnNull [x])
|
Method UnbanChatMember.deserializeResponse() with Boolean return type returns null.
|
||||||||||||
A method that returns either
Boolean.TRUE , Boolean.FALSE or null is an accident waiting to happen. This method can be invoked as though it returned a value of type boolean,
and the compiler will insert automatic unboxing of the Boolean value. If a null value is returned, this will result in a NullPointerException . |
|||||||||||||
Method with Boolean return type returns explicit null
(BooleanReturnNull [x])
|
Method SendChatAction.deserializeResponse() with Boolean return type returns null.
|
||||||||||||
A method that returns either
Boolean.TRUE , Boolean.FALSE or null is an accident waiting to happen. This method can be invoked as though it returned a value of type boolean,
and the compiler will insert automatic unboxing of the Boolean value. If a null value is returned, this will result in a NullPointerException . |
|||||||||||||
Naked call to notify() or notifyAll()
(NotifyNaked [x])
|
Naked BotSession.access$700() call in BotSession.ReaderThread.run().
|
||||||||||||
A call to
BotSession.access$700() was made without any (apparent) accompanying modification to mutable object state. In general, calling a notify method on a monitor is done because some condition another thread is waiting for has become true. However, for the condition to be meaningful, it must involve a heap object that is visible to both threads.This bug does not necessarily indicate an error, since the change to mutable object state may have taken place in a method which then called the method containing the notification. |
|||||||||||||
String concatenation in a loop
(StringConcatInLoop [x])
|
Variable throwableLog is concatenated in loop.
|
||||||||||||
This code concatenates a string (stored in variable
throwableLog ) in a loop. This could be really inefficient. Consider using StringBuilder instead. |
|||||||||||||
Private or package-private field is used, but never written
(UnwrittenPrivateField [x])
|
Private or package-private field TelegramApiException.errorCode is used, but never written.
|
||||||||||||
The field
TelegramApiException.errorCode is used, but never written, so it always has default value.
If it's intended to be written (injected) via reflection, consider annotating it with some annotation to avoid confusion. |
|||||||||||||
Unconditional wait
(WaitUnconditional [x])
|
Unconditional Object.wait() call in BotSession.ReaderThread.run().
|
||||||||||||
This method contains a call to
Object.wait() which is not guarded by conditional control flow. The code should verify that condition it intends to wait for is not already satisfied before calling wait; any previous notifications will be ignored. |
|||||||||||||
Constructor invokes Thread.start()
(StartInConstructor [x])
|
Constructor invokes Thread.start() in BotSession.
|
||||||||||||
The constructor starts a thread. This is likely to be wrong if the class is ever extended/subclassed, since the thread will be started before the subclass constructor is started.
|
Added (0) |
---|
Changed (0) |
---|
Score raised (0) |
---|
Score lowered (0) |
---|
Fixed (0) |
---|