ActiveMQ - PMD Results

ActiveMQ

##### Project Documentation

- About ActiveMQ
- Project Info
- Project Reports
  - Metrics
  - Clover
  - Change Log
  - File Activity
  - Developer Activity
  - JavaDocs
  - JavaDoc Report
  - Source Xref
  - Test Xref
  - Unit Tests
  - Task List
  - PMD Report
- Development Process

## PMD Results

The following document contains the results of PMD.

## Summary

Files | Errors
--- | ---
70 | 144

## Files

Files | Violations
--- | ---
org/codehaus/activemq/ActiveMQConnection.java | 1
org/codehaus/activemq/ActiveMQConnectionMetaData.java | 1
org/codehaus/activemq/ActiveMQMessageConsumer.java | 2
org/codehaus/activemq/ActiveMQMessageProducer.java | 1
org/codehaus/activemq/ActiveMQMessageTransformation.java | 2
org/codehaus/activemq/ActiveMQQueueSender.java | 3
org/codehaus/activemq/ActiveMQSession.java | 2
org/codehaus/activemq/ActiveMQSessionExecutor.java | 1
org/codehaus/activemq/ActiveMQTopicPublisher.java | 5
org/codehaus/activemq/ActiveMQXAConnection.java | 1
org/codehaus/activemq/ActiveMQXASession.java | 3
org/codehaus/activemq/broker/BrokerConnector.java | 1
org/codehaus/activemq/broker/BrokerContainer.java | 2
org/codehaus/activemq/broker/impl/BrokerClientImpl.java | 3
org/codehaus/activemq/broker/impl/BrokerConnectorImpl.java | 1
org/codehaus/activemq/broker/impl/BrokerContainerImpl.java | 1
org/codehaus/activemq/jndi/ActiveMQInitialContextFactory.java | 1
org/codehaus/activemq/journal/impl/LogFileManager.java | 3
org/codehaus/activemq/journal/impl/Segment.java | 2
org/codehaus/activemq/management/JMSEndpointStatsImpl.java | 4
org/codehaus/activemq/message/AbstractPacketReader.java | 1
org/codehaus/activemq/message/AbstractPacketWriter.java | 2
org/codehaus/activemq/message/ActiveMQStreamMessage.java | 6
org/codehaus/activemq/message/util/DataContainer.java | 2
org/codehaus/activemq/message/util/MemoryBoundedQueue.java | 1
org/codehaus/activemq/message/util/MemoryBoundedQueueManager.java | 1
org/codehaus/activemq/ra/ActiveMQBaseEndpointWorker.java | 3
org/codehaus/activemq/selector/SelectorParser.java | 3
org/codehaus/activemq/selector/SelectorParserTokenManager.java | 6
org/codehaus/activemq/selector/TokenMgrError.java | 1
org/codehaus/activemq/service/boundedvm/TransientQueueBoundedMessageManager.java | 3
org/codehaus/activemq/service/boundedvm/TransientQueueSubscription.java | 1
org/codehaus/activemq/service/impl/AbstractTransaction.java | 1
org/codehaus/activemq/service/impl/DurableQueueMessageContainer.java | 1
org/codehaus/activemq/service/impl/DurableQueueMessageContainerManager.java | 1
org/codehaus/activemq/service/impl/DurableTopicMessageContainer.java | 1
org/codehaus/activemq/service/impl/TransactionManagerImpl.java | 2
org/codehaus/activemq/store/bdb/BDbPersistenceAdapter.java | 1
org/codehaus/activemq/store/bdbn/BDbMessageStore.java | 1
org/codehaus/activemq/store/cache/CacheMessageStore.java | 1
org/codehaus/activemq/store/cache/CachePersistenceAdapter.java | 1
org/codehaus/activemq/store/cache/CacheTopicMessageStore.java | 1
org/codehaus/activemq/store/jdbc/JDBCMessageStore.java | 1
org/codehaus/activemq/store/jdbc/JDBCPersistenceAdapter.java | 4
org/codehaus/activemq/store/jdbc/JDBCPreparedTransactionStore.java | 1
org/codehaus/activemq/store/jdbc/JDBCTopicMessageStore.java | 1
org/codehaus/activemq/store/jdbc/adapter/BlobJDBCAdapter.java | 4
org/codehaus/activemq/store/jdbc/adapter/DefaultJDBCAdapter.java | 24
org/codehaus/activemq/store/journal/JournalMessageStore.java | 1
org/codehaus/activemq/store/journal/JournalPersistenceAdapter.java | 3
org/codehaus/activemq/store/vm/VMMessageStore.java | 1
org/codehaus/activemq/transport/DiscoveryNetworkConnector.java | 1
org/codehaus/activemq/transport/NetworkMessageBridge.java | 1
org/codehaus/activemq/transport/gnet/GTransportChannel.java | 1
org/codehaus/activemq/transport/http/HttpTransportChannelSupport.java | 1
org/codehaus/activemq/transport/jgroups/JGroupsTransportChannel.java | 1
org/codehaus/activemq/transport/jgroups/JGroupsTransportServerChannel.java | 1
org/codehaus/activemq/transport/jxta/JxtaTransportChannel.java | 1
org/codehaus/activemq/transport/jxta/JxtaTransportServerChannel.java | 1
org/codehaus/activemq/transport/multicast/MulticastTransportChannel.java | 1
org/codehaus/activemq/transport/multicast/MulticastTransportServerChannel.java | 1
org/codehaus/activemq/transport/reliable/ReliableTransportChannel.java | 2
org/codehaus/activemq/transport/tcp/TcpTransportChannel.java | 3
org/codehaus/activemq/transport/tcp/TcpTransportServerChannel.java | 1
org/codehaus/activemq/transport/udp/UdpTransportChannel.java | 2
org/codehaus/activemq/transport/zeroconf/ZeroconfDiscoveryAgent.java | 1
org/codehaus/activemq/util/BitArrayBin.java | 1
org/codehaus/activemq/util/ExceptionTemplate.java | 1
org/codehaus/activemq/util/FactoryFinder.java | 1
org/codehaus/activemq/web/ConnectionManager.java | 1

### org/codehaus/activemq/ActiveMQConnection.java

Violation | Line
--- | ---
Avoid duplicate imports such as 'javax.jms.IllegalStateException' | 49

### org/codehaus/activemq/ActiveMQConnectionMetaData.java

Violation | Line
--- | ---
Avoid unused imports such as 'JMSException' | 21

### org/codehaus/activemq/ActiveMQMessageConsumer.java

Violation | Line
--- | ---
Avoid empty catch blocks | 320
Avoid empty catch blocks | 322

### org/codehaus/activemq/ActiveMQMessageProducer.java

Violation | Line
--- | ---
Avoid unused imports such as 'MessageFormatException' | 31

### org/codehaus/activemq/ActiveMQMessageTransformation.java

Violation | Line
--- | ---
Avoid empty catch blocks | 109
Avoid empty catch blocks | 123

### org/codehaus/activemq/ActiveMQQueueSender.java

Violation | Line
--- | ---
Avoid unused imports such as 'Destination' | 23
Avoid unused imports such as 'InvalidDestinationException' | 24
Avoid unused imports such as 'MessageFormatException' | 27

### org/codehaus/activemq/ActiveMQSession.java

Violation | Line
--- | ---
Avoid duplicate imports such as 'javax.jms.IllegalStateException' | 33
Avoid unused local variables such as 'doRemove' | 498

### org/codehaus/activemq/ActiveMQSessionExecutor.java

Violation | Line
--- | ---
Avoid unused private fields such as 'log' | 36

### org/codehaus/activemq/ActiveMQTopicPublisher.java

Violation | Line
--- | ---
Avoid unused imports such as 'Destination' | 23
Avoid unused imports such as 'InvalidDestinationException' | 24
Avoid unused imports such as 'MessageFormatException' | 27
Avoid unused imports such as 'Session' | 28
Avoid unused imports such as 'TopicSession' | 31

### org/codehaus/activemq/ActiveMQXAConnection.java

Violation | Line
--- | ---
Avoid unused private fields such as 'log' | 50

### org/codehaus/activemq/ActiveMQXASession.java

Violation | Line
--- | ---
Avoid unused private fields such as 'log' | 67
Avoid empty 'if' statements | 114
Avoid empty 'if' statements | 117

### org/codehaus/activemq/broker/BrokerConnector.java

Violation | Line
--- | ---
Avoid unused imports such as 'JMSSecurityException' | 34

### org/codehaus/activemq/broker/BrokerContainer.java

Violation | Line
--- | ---
Avoid unused imports such as 'InvalidClientIDException' | 37
Avoid unused imports such as 'JMSSecurityException' | 39

### org/codehaus/activemq/broker/impl/BrokerClientImpl.java

Violation | Line
--- | ---
Avoid unused local variables such as 'packet' | 154
Avoid empty catch blocks | 394
Avoid empty 'if' statements | 633

### org/codehaus/activemq/broker/impl/BrokerConnectorImpl.java

Violation | Line
--- | ---
Avoid unused imports such as 'JMSSecurityException' | 32

### org/codehaus/activemq/broker/impl/BrokerContainerImpl.java

Violation | Line
--- | ---
Avoid unused imports such as 'JMSSecurityException' | 45

### org/codehaus/activemq/jndi/ActiveMQInitialContextFactory.java

Violation | Line
--- | ---
Avoid unused imports such as 'ConnectionFactory' | 26

### org/codehaus/activemq/journal/impl/LogFileManager.java

Violation | Line
--- | ---
Avoid unused private fields such as 'log' | 42
Avoid unused private fields such as 'LOG_HEADER_SIZE' | 44
Avoid empty catch blocks | 387

### org/codehaus/activemq/journal/impl/Segment.java

Violation | Line
--- | ---
Avoid empty catch blocks | 97
Ensure you override both equals() and hashCode() | 232

### org/codehaus/activemq/management/JMSEndpointStatsImpl.java

Violation | Line
--- | ---
Avoid unused imports such as 'Destination' | 24
Avoid unused imports such as 'MessageConsumer' | 26
Avoid unused imports such as 'MessageProducer' | 27
Avoid unused imports such as 'Session' | 28

### org/codehaus/activemq/message/AbstractPacketReader.java

Violation | Line
--- | ---
Avoid unused imports such as 'Set' | 26

### org/codehaus/activemq/message/AbstractPacketWriter.java

Violation | Line
--- | ---
Avoid unused imports such as 'Iterator' | 25
Avoid unused imports such as 'Set' | 26

### org/codehaus/activemq/message/ActiveMQStreamMessage.java

Violation | Line
--- | ---
Avoid unnecessary temporaries when converting primitives to Strings | 711
Avoid unnecessary temporaries when converting primitives to Strings | 714
Avoid unnecessary temporaries when converting primitives to Strings | 717
Avoid unnecessary temporaries when converting primitives to Strings | 720
Avoid unnecessary temporaries when converting primitives to Strings | 723
Avoid unnecessary temporaries when converting primitives to Strings | 726

### org/codehaus/activemq/message/util/DataContainer.java

Violation | Line
--- | ---
Avoid unused private fields such as 'log' | 45
Avoid unused local variables such as 'fileName' | 172

### org/codehaus/activemq/message/util/MemoryBoundedQueue.java

Violation | Line
--- | ---
Avoid unused private fields such as 'log' | 44

### org/codehaus/activemq/message/util/MemoryBoundedQueueManager.java

Violation | Line
--- | ---
Avoid unused private fields such as 'log' | 38

### org/codehaus/activemq/ra/ActiveMQBaseEndpointWorker.java

Violation | Line
--- | ---
Avoid unused private fields such as 'log' | 40
Avoid empty catch blocks | 66
Avoid empty catch blocks | 78

### org/codehaus/activemq/selector/SelectorParser.java

Violation | Line
--- | ---
Avoid unused local variables such as 'not' | 154
Avoid unused local variables such as 'first' | 475
Avoid unused private fields such as 'jj_semLA' | 1115

### org/codehaus/activemq/selector/SelectorParserTokenManager.java

Violation | Line
--- | ---
Avoid unused imports such as 'InvalidSelectorException' | 5
Avoid unused private methods such as 'jjStopAtPos' | 12
Avoid unused private methods such as 'jjCheckNAddStates' | 444
Avoid unused local variables such as 'nextStates' | 464
Avoid unused local variables such as 'j' | 469
Avoid unused local variables such as 'kind' | 871

### org/codehaus/activemq/selector/TokenMgrError.java

Violation | Line
--- | ---
Avoid unused formal parameters such as 'lexState' | 96

### org/codehaus/activemq/service/boundedvm/TransientQueueBoundedMessageManager.java

Violation | Line
--- | ---
Avoid unused imports such as 'DispatcherImpl' | 43
Avoid unused imports such as 'MessageContainerManagerSupport' | 44
Avoid unused local variables such as 'queue' | 146

### org/codehaus/activemq/service/boundedvm/TransientQueueSubscription.java

Violation | Line
--- | ---
Avoid unused imports such as 'Packet' | 29

### org/codehaus/activemq/service/impl/AbstractTransaction.java

Violation | Line
--- | ---
Avoid unused private fields such as 'log' | 42

### org/codehaus/activemq/service/impl/DurableQueueMessageContainer.java

Violation | Line
--- | ---
Avoid unused local variables such as 'result' | 195

### org/codehaus/activemq/service/impl/DurableQueueMessageContainerManager.java

Violation | Line
--- | ---
Avoid unused imports such as 'TransientQueueBoundedMessageContainer' | 43

### org/codehaus/activemq/service/impl/DurableTopicMessageContainer.java

Violation | Line
--- | ---
Avoid unused private fields such as 'log' | 41

### org/codehaus/activemq/service/impl/TransactionManagerImpl.java

Violation | Line
--- | ---
Avoid unused private methods such as 'addActiveTransaction' | 185
Avoid unused private methods such as 'removeActiveTransaction' | 194

### org/codehaus/activemq/store/bdb/BDbPersistenceAdapter.java

Violation | Line
--- | ---
Avoid unused imports such as 'PersistenceAdapter' | 35

### org/codehaus/activemq/store/bdbn/BDbMessageStore.java

Violation | Line
--- | ---
Avoid unused local variables such as 'transaction' | 90

### org/codehaus/activemq/store/cache/CacheMessageStore.java

Violation | Line
--- | ---
Avoid unused private fields such as 'log' | 38

### org/codehaus/activemq/store/cache/CachePersistenceAdapter.java

Violation | Line
--- | ---
Avoid unused private fields such as 'log' | 42

### org/codehaus/activemq/store/cache/CacheTopicMessageStore.java

Violation | Line
--- | ---
Avoid unused private fields such as 'log' | 40

### org/codehaus/activemq/store/jdbc/JDBCMessageStore.java

Violation | Line
--- | ---
Avoid unused private fields such as 'log' | 42

### org/codehaus/activemq/store/jdbc/JDBCPersistenceAdapter.java

Violation | Line
--- | ---
Avoid unused imports such as 'PersistenceAdapter' | 26
Avoid empty catch blocks | 116
Avoid empty catch blocks | 134
Avoid empty catch blocks | 218

### org/codehaus/activemq/store/jdbc/JDBCPreparedTransactionStore.java

Violation | Line
--- | ---
Avoid unused local variables such as 'id' | 91

### org/codehaus/activemq/store/jdbc/JDBCTopicMessageStore.java

Violation | Line
--- | ---
Avoid unused private fields such as 'log' | 44

### org/codehaus/activemq/store/jdbc/adapter/BlobJDBCAdapter.java

Violation | Line
--- | ---
Avoid empty catch blocks | 106
Avoid empty catch blocks | 110
Avoid empty catch blocks | 141
Avoid empty catch blocks | 142

### org/codehaus/activemq/store/jdbc/adapter/DefaultJDBCAdapter.java

Violation | Line
--- | ---
Avoid unused local variables such as 'rc' | 97
Avoid empty catch blocks | 110
Avoid empty catch blocks | 132
Avoid empty catch blocks | 137
Avoid empty catch blocks | 158
Avoid empty catch blocks | 182
Avoid empty catch blocks | 187
Avoid empty catch blocks | 211
Avoid empty catch blocks | 216
Avoid empty catch blocks | 234
Avoid empty catch blocks | 259
Avoid empty catch blocks | 264
Avoid empty catch blocks | 291
Avoid empty catch blocks | 296
Avoid empty catch blocks | 314
Avoid empty catch blocks | 336
Avoid empty catch blocks | 366
Avoid empty catch blocks | 371
Avoid empty catch blocks | 396
Avoid empty catch blocks | 426
Avoid empty catch blocks | 431
Avoid empty catch blocks | 471
Avoid empty catch blocks | 506
Avoid empty catch blocks | 511

### org/codehaus/activemq/store/journal/JournalMessageStore.java

Violation | Line
--- | ---
Avoid unused private fields such as 'log' | 47

### org/codehaus/activemq/store/journal/JournalPersistenceAdapter.java

Violation | Line
--- | ---
Avoid unused private fields such as 'transactionTemplate' | 72
Avoid unused private fields such as 'performingRecovery' | 75
Avoid unused local variables such as 'destination' | 391

### org/codehaus/activemq/store/vm/VMMessageStore.java

Violation | Line
--- | ---
Avoid unused private fields such as 'log' | 39

### org/codehaus/activemq/transport/DiscoveryNetworkConnector.java

Violation | Line
--- | ---
Avoid unused private fields such as 'discoveryAgent' | 39

### org/codehaus/activemq/transport/NetworkMessageBridge.java

Violation | Line
--- | ---
Avoid unused imports such as 'MessageProducer' | 25

### org/codehaus/activemq/transport/gnet/GTransportChannel.java

Violation | Line
--- | ---
Avoid unused local variables such as 'cp' | 92

### org/codehaus/activemq/transport/http/HttpTransportChannelSupport.java

Violation | Line
--- | ---
Avoid unused private fields such as 'log' | 32

### org/codehaus/activemq/transport/jgroups/JGroupsTransportChannel.java

Violation | Line
--- | ---
Avoid empty catch blocks | 202

### org/codehaus/activemq/transport/jgroups/JGroupsTransportServerChannel.java

Violation | Line
--- | ---
Avoid unused private fields such as 'log' | 33

### org/codehaus/activemq/transport/jxta/JxtaTransportChannel.java

Violation | Line
--- | ---
Avoid unused private fields such as 'log' | 40

### org/codehaus/activemq/transport/jxta/JxtaTransportServerChannel.java

Violation | Line
--- | ---
Avoid unused private fields such as 'log' | 41

### org/codehaus/activemq/transport/multicast/MulticastTransportChannel.java

Violation | Line
--- | ---
Avoid unused private fields such as 'log' | 38

### org/codehaus/activemq/transport/multicast/MulticastTransportServerChannel.java

Violation | Line
--- | ---
Avoid empty 'if' statements | 55

### org/codehaus/activemq/transport/reliable/ReliableTransportChannel.java

Violation | Line
--- | ---
Avoid unused private fields such as 'packetList' | 45
Avoid unused private fields such as 'cacheMessagesForFailover' | 46

### org/codehaus/activemq/transport/tcp/TcpTransportChannel.java

Violation | Line
--- | ---
Avoid empty 'while' statements | 246
Avoid empty catch blocks | 265
Avoid empty catch blocks | 273

### org/codehaus/activemq/transport/tcp/TcpTransportServerChannel.java

Violation | Line
--- | ---
Avoid empty catch blocks | 151

### org/codehaus/activemq/transport/udp/UdpTransportChannel.java

Violation | Line
--- | ---
Avoid unused private fields such as 'idGenerator' | 55
Avoid empty catch blocks | 206

### org/codehaus/activemq/transport/zeroconf/ZeroconfDiscoveryAgent.java

Violation | Line
--- | ---
Avoid unused imports such as 'DiscoveryAgent' | 24

### org/codehaus/activemq/util/BitArrayBin.java

Violation | Line
--- | ---
Avoid unused private fields such as 'currentIndex' | 30

### org/codehaus/activemq/util/ExceptionTemplate.java

Violation | Line
--- | ---
No need to import a type that's in the same package | 20

### org/codehaus/activemq/util/FactoryFinder.java

Violation | Line
--- | ---
Avoid empty catch blocks | 101

### org/codehaus/activemq/web/ConnectionManager.java

Violation | Line
--- | ---
Avoid unused private fields such as 'log' | 34