You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ta...@apache.org on 2014/10/02 18:13:09 UTC
git commit: Fix some issues found with Findbugs
Repository: qpid-jms
Updated Branches:
refs/heads/master 51da0e5ac -> d4218476a
Fix some issues found with Findbugs
Project: http://git-wip-us.apache.org/repos/asf/qpid-jms/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms/commit/d4218476
Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/d4218476
Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/d4218476
Branch: refs/heads/master
Commit: d4218476af1c940837b88928dbc2047123e501c8
Parents: 51da0e5
Author: Timothy Bish <ta...@gmail.com>
Authored: Thu Oct 2 12:13:03 2014 -0400
Committer: Timothy Bish <ta...@gmail.com>
Committed: Thu Oct 2 12:13:03 2014 -0400
----------------------------------------------------------------------
.../src/main/java/org/apache/qpid/jms/JmsConnection.java | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/d4218476/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsConnection.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsConnection.java b/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsConnection.java
index cc2f979..2d49c48 100644
--- a/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsConnection.java
+++ b/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsConnection.java
@@ -230,9 +230,11 @@ public class JmsConnection implements Connection, TopicConnection, QueueConnecti
destroyResource(connectionInfo);
}
- if (clientIdSet) {
- connectionInfo.setClientId(null);
- clientIdSet = false;
+ synchronized (this) {
+ if (clientIdSet) {
+ connectionInfo.setClientId(null);
+ clientIdSet = false;
+ }
}
tempDestinations.clear();
@@ -303,7 +305,7 @@ public class JmsConnection implements Connection, TopicConnection, QueueConnecti
* @see javax.jms.Connection#getClientID()
*/
@Override
- public String getClientID() throws JMSException {
+ public synchronized String getClientID() throws JMSException {
checkClosedOrFailed();
return this.connectionInfo.getClientId();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org