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:
parent
2214724565
commit
97a9c690ae
|
@ -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)) {
|
||||
|
|
Loading…
Reference in New Issue