activemq-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jiri Danek (JIRA)" <>
Subject [jira] [Created] (ARTEMIS-1399) FindBugs: Comparing incompatible types for equality in
Date Wed, 06 Sep 2017 21:10:01 GMT
Jiri Danek created ARTEMIS-1399:

             Summary: FindBugs: Comparing incompatible types for equality in
                 Key: ARTEMIS-1399
             Project: ActiveMQ Artemis
          Issue Type: Bug
          Components: Broker
    Affects Versions: 2.4.0
         Environment: commit 53a9c9b47b8c64ff2c0f2c6be40a1cf5984e5e8b (HEAD -> master,
Merge: 49ef04b6f d2dcf1bba
Author: Clebert Suconic <>
Date:   Wed Sep 6 10:30:13 2017 -0400
            Reporter: Jiri Danek
            Priority: Minor

            case CONSUMER_ID:
               Queue q = server.locateQueue(new SimpleString(queue.getName()));
               for (Consumer consumer : q.getConsumers()) {
                  if (value.equals(consumer.sequentialID()))
                     return true;
               return false;

see at

Does not look hard to fix, but the error handling is not straightforward (is it ok to swallow
invalid input and simply find nothing if the user does not give valid ID? probably yes...
What to do if user asks comparing operation "CONTAINS" and not "EQUALS"? Does that mean return
queues where the given ID is one of the consumers/the sole consumer?)

This message was sent by Atlassian JIRA

View raw message