summaryrefslogtreecommitdiff
path: root/java/management/common/src
diff options
context:
space:
mode:
authorRobert Godfrey <rgodfrey@apache.org>2010-09-17 14:56:47 +0000
committerRobert Godfrey <rgodfrey@apache.org>2010-09-17 14:56:47 +0000
commit22700415041aef90d033c0fb86b639741a47a6dd (patch)
treefb08bb213ce0ce9fa657a762a496891abc7c87e5 /java/management/common/src
parent373353b43ec525a38635843b541e92100c86fe18 (diff)
downloadqpid-python-22700415041aef90d033c0fb86b639741a47a6dd.tar.gz
QPID-2857 : Address issues found by running FindBugs against the Java codebase
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@998162 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/management/common/src')
-rw-r--r--java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedExchange.java22
1 files changed, 16 insertions, 6 deletions
diff --git a/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedExchange.java b/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedExchange.java
index e5ca69eabb..9b4c75c4a5 100644
--- a/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedExchange.java
+++ b/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedExchange.java
@@ -21,6 +21,9 @@
package org.apache.qpid.management.common.mbeans;
import java.io.IOException;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
import javax.management.JMException;
import javax.management.MBeanOperationInfo;
@@ -41,15 +44,22 @@ public interface ManagedExchange
//TabularType and contained CompositeType key/description info for DIRECT/TOPIC/FANOUT exchanges.
//For compatibility reasons, DONT MODIFY the existing key values if expanding the set.
- String[] COMPOSITE_ITEM_NAMES = {"Binding Key", "Queue Names"};
- String[] COMPOSITE_ITEM_DESCRIPTIONS = {"Binding Key", "Queue Names"};
- String[] TABULAR_UNIQUE_INDEX = {COMPOSITE_ITEM_NAMES[0]};
+ String BINDING_KEY = "Binding Key";
+ String QUEUE_NAMES = "Queue Names";
+
+ List<String> COMPOSITE_ITEM_NAMES = Collections.unmodifiableList(Arrays.asList(BINDING_KEY, QUEUE_NAMES));
+ List<String> COMPOSITE_ITEM_DESCRIPTIONS = Collections.unmodifiableList(Arrays.asList(BINDING_KEY, QUEUE_NAMES));
+ String[] TABULAR_UNIQUE_INDEX = {BINDING_KEY};
//TabularType and contained CompositeType key/description info for HEADERS exchange only.
//For compatibility reasons, DONT MODIFY the existing key values if expanding the set.
- String[] HEADERS_COMPOSITE_ITEM_NAMES = new String[]{"Binding No", "Queue Name", "Queue Bindings"};
- String[] HEADERS_COMPOSITE_ITEM_DESC = new String[]{"Binding No", "Queue Name", "Queue Bindings"};
- String[] HEADERS_TABULAR_UNIQUE_INDEX = new String[]{HEADERS_COMPOSITE_ITEM_NAMES[0]};
+ String BINDING_NUMBER = "Binding No";
+ String QUEUE_NAME = "Queue Name";
+ String QUEUE_BINDINGS = "Queue Bindings";
+
+ String[] HEADERS_COMPOSITE_ITEM_NAMES = new String[]{BINDING_NUMBER, QUEUE_NAME, QUEUE_BINDINGS};
+ String[] HEADERS_COMPOSITE_ITEM_DESC = new String[]{BINDING_NUMBER, QUEUE_NAME, QUEUE_BINDINGS};
+ String[] HEADERS_TABULAR_UNIQUE_INDEX = new String[]{BINDING_NUMBER};
/**
* Returns the name of the managed exchange.