ARTEMIS-4695 BAD_COPY_PASTE in VersionedStompFrameHandler.java

In 1st branch (line 274) of the if() statement, the
Boolean.parseBoolean() method accepts the value
frame.getHeader(Stomp.Headers.Subscribe.NO_LOCAL), which is used in line
273.

In 2nd branch (line 276), the Boolean.parseBoolean() method accepts the
value frame.getHeader(Stomp.Headers.Subscribe.NO_LOCAL), although the
other value frame.hasHeader(Stomp.Headers.Subscribe.ACTIVEMQ_NO_LOCAL)
is used.

Found by Linux Verification Center (portal.linuxtesting.ru) with SVACE.
Author A. Slepykh.
This commit is contained in:
aslepykh 2024-02-29 09:42:37 +03:00 committed by Justin Bertram
parent 2214724565
commit 97a9c690ae
No known key found for this signature in database
GPG Key ID: F41830B875BB8633
1 changed files with 1 additions and 1 deletions

View File

@ -273,7 +273,7 @@ public abstract class VersionedStompFrameHandler {
if (frame.hasHeader(Stomp.Headers.Subscribe.NO_LOCAL)) {
noLocal = Boolean.parseBoolean(frame.getHeader(Stomp.Headers.Subscribe.NO_LOCAL));
} else if (frame.hasHeader(Stomp.Headers.Subscribe.ACTIVEMQ_NO_LOCAL)) {
noLocal = Boolean.parseBoolean(frame.getHeader(Stomp.Headers.Subscribe.NO_LOCAL));
noLocal = Boolean.parseBoolean(frame.getHeader(Stomp.Headers.Subscribe.ACTIVEMQ_NO_LOCAL));
}
Integer consumerWindowSize = null;
if (frame.hasHeader(Headers.Subscribe.CONSUMER_WINDOW_SIZE)) {