From 451bda18227dccc91a08fe1ade559d0f91be932d Mon Sep 17 00:00:00 2001 From: Robert Godfrey Date: Tue, 19 Aug 2014 20:07:48 +0000 Subject: QPID-6022 : [Java] Fix issues highlighted by code scanning tools git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1618964 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/java/org/apache/qpid/client/AMQSession_0_10.java | 2 +- .../org/apache/qpid/client/message/FieldTableSupport.java | 6 +++--- .../org/apache/qpid/client/protocol/AMQProtocolHandler.java | 9 ++++----- .../java/org/apache/qpid/client/util/BlockingWaiter.java | 12 ++++++------ 4 files changed, 14 insertions(+), 15 deletions(-) (limited to 'qpid/java/client') diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java b/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java index 46473900c0..19720ea386 100644 --- a/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java +++ b/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java @@ -101,7 +101,7 @@ public class AMQSession_0_10 extends AMQSession _sender; private long _lastReadTime = System.currentTimeMillis(); @@ -451,9 +455,6 @@ public class AMQProtocolHandler implements ProtocolEngine _lastFailoverException = null; } - private static int _messageReceivedCount; - - public void received(ByteBuffer msg) { _readBytes += msg.remaining(); @@ -559,8 +560,6 @@ public class AMQProtocolHandler implements ProtocolEngine } - private static int _messagesOut; - public StateWaiter createWaiter(Set states) throws AMQException { return getStateManager().createWaiter(states); diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/util/BlockingWaiter.java b/qpid/java/client/src/main/java/org/apache/qpid/client/util/BlockingWaiter.java index 53b6730ef7..21f1623dd1 100644 --- a/qpid/java/client/src/main/java/org/apache/qpid/client/util/BlockingWaiter.java +++ b/qpid/java/client/src/main/java/org/apache/qpid/client/util/BlockingWaiter.java @@ -20,6 +20,11 @@ */ package org.apache.qpid.client.util; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.concurrent.locks.Condition; +import java.util.concurrent.locks.ReentrantLock; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -27,11 +32,6 @@ import org.apache.qpid.AMQException; import org.apache.qpid.AMQTimeoutException; import org.apache.qpid.client.failover.FailoverException; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicBoolean; -import java.util.concurrent.locks.Condition; -import java.util.concurrent.locks.ReentrantLock; - /** * BlockingWaiter is a 'rendezvous' which delegates handling of * incoming Objects to a listener implemented as a sub-class of this and hands off the process or @@ -243,7 +243,7 @@ public abstract class BlockingWaiter } else { - _logger.error("WARNING: new error '" + e == null ? "null" : e.getMessage() + "' arrived while old one not yet processed:" + _error.getMessage()); + _logger.error("WARNING: new error '" + (e == null ? "null" : e.getMessage()) + "' arrived while old one not yet processed:" + _error.getMessage()); } if (_waiting.get()) -- cgit v1.2.1