qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rob...@apache.org
Subject [4/5] qpid-jms git commit: update delete handling, dont wrap exceptions
Date Tue, 13 Jan 2015 16:02:37 GMT
update delete handling, dont wrap exceptions


Project: http://git-wip-us.apache.org/repos/asf/qpid-jms/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms/commit/71cff459
Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/71cff459
Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/71cff459

Branch: refs/heads/master
Commit: 71cff459dfeb1f83915dae45c854b753a02002e3
Parents: 89c7942
Author: Robert Gemmell <robbie@apache.org>
Authored: Tue Jan 13 13:28:44 2015 +0000
Committer: Robert Gemmell <robbie@apache.org>
Committed: Tue Jan 13 16:02:09 2015 +0000

----------------------------------------------------------------------
 .../src/main/java/org/apache/qpid/jms/JmsConnection.java     | 2 +-
 .../src/main/java/org/apache/qpid/jms/JmsTemporaryQueue.java | 8 ++------
 .../src/main/java/org/apache/qpid/jms/JmsTemporaryTopic.java | 8 ++------
 3 files changed, 5 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/71cff459/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 f926916..c71e3bc 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
@@ -569,7 +569,7 @@ public class JmsConnection implements Connection, TopicConnection, QueueConnecti
 
             for (JmsSession session : this.sessions) {
                 if (session.isDestinationInUse(destination)) {
-                    throw new JMSException("A consumer is consuming from the temporary destination");
+                    throw new IllegalStateException("A consumer is consuming from the temporary
destination");
                 }
             }
 

http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/71cff459/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsTemporaryQueue.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsTemporaryQueue.java b/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsTemporaryQueue.java
index 856794f..dcc5b02 100644
--- a/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsTemporaryQueue.java
+++ b/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsTemporaryQueue.java
@@ -43,12 +43,8 @@ public class JmsTemporaryQueue extends JmsTemporaryDestination implements
Tempor
      * @see javax.jms.TemporaryQueue#delete()
      */
     @Override
-    public void delete() {
-        try {
-            tryDelete();
-        } catch (JMSException e) {
-            throw new RuntimeException(e);
-        }
+    public void delete() throws JMSException {
+        tryDelete();
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/71cff459/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsTemporaryTopic.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsTemporaryTopic.java b/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsTemporaryTopic.java
index aeb39e2..0c5acef 100644
--- a/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsTemporaryTopic.java
+++ b/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsTemporaryTopic.java
@@ -43,12 +43,8 @@ public class JmsTemporaryTopic extends JmsTemporaryDestination implements
Tempor
      * @see javax.jms.TemporaryTopic#delete()
      */
     @Override
-    public void delete() {
-        try {
-            tryDelete();
-        } catch (JMSException e) {
-            throw new RuntimeException(e);
-        }
+    public void delete() throws JMSException {
+        tryDelete();
     }
 
     /**


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message