diff options
| author | Robert Godfrey <rgodfrey@apache.org> | 2010-09-12 22:40:40 +0000 |
|---|---|---|
| committer | Robert Godfrey <rgodfrey@apache.org> | 2010-09-12 22:40:40 +0000 |
| commit | b2121822d362463b22124da58f8c760d1149959f (patch) | |
| tree | 2ddab287f32837766db005bc077f15cb6b608af7 /java/client/example/src/main | |
| parent | 9240fc138b26b4d334f7f6000208924385e9463d (diff) | |
| download | qpid-python-b2121822d362463b22124da58f8c760d1149959f.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@996393 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/client/example/src/main')
6 files changed, 11 insertions, 11 deletions
diff --git a/java/client/example/src/main/java/org/apache/qpid/example/Drain.java b/java/client/example/src/main/java/org/apache/qpid/example/Drain.java index 831cea8745..b43031ad23 100644 --- a/java/client/example/src/main/java/org/apache/qpid/example/Drain.java +++ b/java/client/example/src/main/java/org/apache/qpid/example/Drain.java @@ -100,6 +100,6 @@ public class Drain extends OptionParser String u = "Usage: drain [OPTIONS] 'ADDRESS'"; String d = "Drains messages from the specified address."; - Drain drain = new Drain(args,u,d); + new Drain(args,u,d); } } diff --git a/java/client/example/src/main/java/org/apache/qpid/example/OptionParser.java b/java/client/example/src/main/java/org/apache/qpid/example/OptionParser.java index 6b1f514258..f4e17c5c4c 100644 --- a/java/client/example/src/main/java/org/apache/qpid/example/OptionParser.java +++ b/java/client/example/src/main/java/org/apache/qpid/example/OptionParser.java @@ -69,7 +69,7 @@ public class OptionParser protected Map<String,Object> optMap = new HashMap<String,Object>(); - protected static List<Option> optDefs = new ArrayList<Option>(); + protected static final List<Option> optDefs = new ArrayList<Option>(); protected String usage; protected String desc; diff --git a/java/client/example/src/main/java/org/apache/qpid/example/Spout.java b/java/client/example/src/main/java/org/apache/qpid/example/Spout.java index e831df8d28..5da319a658 100644 --- a/java/client/example/src/main/java/org/apache/qpid/example/Spout.java +++ b/java/client/example/src/main/java/org/apache/qpid/example/Spout.java @@ -143,6 +143,6 @@ public class Spout extends OptionParser String u = "Usage: spout [OPTIONS] 'ADDRESS'"; String d = "Send messages to the specified address."; - Spout drain = new Spout(args,u,d); + new Spout(args,u,d); } } diff --git a/java/client/example/src/main/java/org/apache/qpid/example/shared/InitialContextHelper.java b/java/client/example/src/main/java/org/apache/qpid/example/shared/InitialContextHelper.java index 1328816602..16a185133a 100644 --- a/java/client/example/src/main/java/org/apache/qpid/example/shared/InitialContextHelper.java +++ b/java/client/example/src/main/java/org/apache/qpid/example/shared/InitialContextHelper.java @@ -37,8 +37,8 @@ public class InitialContextHelper { public static final String _defaultPropertiesName = "example.properties"; - protected static Properties _fileProperties; - protected static InitialContext _initialContext; + protected Properties _fileProperties; + protected InitialContext _initialContext; protected static final Logger _log = LoggerFactory.getLogger(InitialContextHelper.class); public InitialContextHelper(String propertiesName) throws ContextException diff --git a/java/client/example/src/main/java/org/apache/qpid/example/subscriber/MonitoredSubscriber.java b/java/client/example/src/main/java/org/apache/qpid/example/subscriber/MonitoredSubscriber.java index d43b823a13..e4eb5ac7f5 100644 --- a/java/client/example/src/main/java/org/apache/qpid/example/subscriber/MonitoredSubscriber.java +++ b/java/client/example/src/main/java/org/apache/qpid/example/subscriber/MonitoredSubscriber.java @@ -33,7 +33,7 @@ public class MonitoredSubscriber extends Subscriber private static final Logger _logger = LoggerFactory.getLogger(MonitoredSubscriber.class); - private static MessageConsumer _monitorConsumer; + private MessageConsumer _monitorConsumer; public MonitoredSubscriber() { @@ -107,7 +107,7 @@ public class MonitoredSubscriber extends Subscriber MonitoredSubscriber._logger.info("Starting monitored subscription ..."); - MonitoredSubscriber._connection.start(); + _connection.start(); //and now start ordinary consumption too subscribe(); diff --git a/java/client/example/src/main/java/org/apache/qpid/example/subscriber/Subscriber.java b/java/client/example/src/main/java/org/apache/qpid/example/subscriber/Subscriber.java index f75558299c..c36668575f 100644 --- a/java/client/example/src/main/java/org/apache/qpid/example/subscriber/Subscriber.java +++ b/java/client/example/src/main/java/org/apache/qpid/example/subscriber/Subscriber.java @@ -38,13 +38,13 @@ public class Subscriber { private static final Logger _log = LoggerFactory.getLogger(Subscriber.class); - protected static Connection _connection; + protected Connection _connection; - protected static MessageConsumer _consumer; + protected MessageConsumer _consumer; - protected static InitialContextHelper _contextHelper; + protected InitialContextHelper _contextHelper; - protected static AMQConnectionFactory _connectionFactory; + protected AMQConnectionFactory _connectionFactory; protected Destination _destination; |
