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 2016/04/04 22:00:14 UTC
qpid-jms git commit: QPIDJMS-166 Clean up some old TODOs around error
messages and documentation.
Repository: qpid-jms
Updated Branches:
refs/heads/master 5fb9399de -> e4fc8eef5
QPIDJMS-166 Clean up some old TODOs around error messages and
documentation.
Project: http://git-wip-us.apache.org/repos/asf/qpid-jms/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms/commit/e4fc8eef
Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/e4fc8eef
Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/e4fc8eef
Branch: refs/heads/master
Commit: e4fc8eef550be624045f0c17015241c6bc58146b
Parents: 5fb9399
Author: Timothy Bish <ta...@gmail.com>
Authored: Mon Apr 4 16:00:03 2016 -0400
Committer: Timothy Bish <ta...@gmail.com>
Committed: Mon Apr 4 16:00:03 2016 -0400
----------------------------------------------------------------------
.../apache/qpid/jms/provider/amqp/AmqpConsumer.java | 2 +-
.../qpid/jms/provider/amqp/AmqpSaslAuthenticator.java | 14 +++++++-------
.../provider/amqp/message/AmqpJmsMessageBuilder.java | 1 -
3 files changed, 8 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/e4fc8eef/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/AmqpConsumer.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/AmqpConsumer.java b/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/AmqpConsumer.java
index 3348396..054b438 100644
--- a/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/AmqpConsumer.java
+++ b/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/AmqpConsumer.java
@@ -329,7 +329,7 @@ public class AmqpConsumer extends AmqpAbstractResource<JmsConsumerInfo, Receiver
* @param timeout
* the amount of time to tell the remote peer to keep this pull request valid.
* @param request
- * TODO.
+ * the asynchronous request object waiting to be notified of the pull having completed.
*/
public void pull(final long timeout, final AsyncResult request) {
LOG.trace("Pull on consumer {} with timeout = {}", getConsumerId(), timeout);
http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/e4fc8eef/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/AmqpSaslAuthenticator.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/AmqpSaslAuthenticator.java b/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/AmqpSaslAuthenticator.java
index d4b05a9..94bcf24 100644
--- a/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/AmqpSaslAuthenticator.java
+++ b/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/AmqpSaslAuthenticator.java
@@ -116,13 +116,11 @@ public class AmqpSaslAuthenticator {
sasl.send(response, 0, response.length);
}
} else {
- // TODO - Better error message.
throw new JMSSecurityException("Could not find a suitable SASL mechanism for the remote peer using the available credentials.");
}
}
} catch (SaslException se) {
- // TODO - Better error message.
- JMSSecurityException jmsse = new JMSSecurityException("Exception while processing SASL init.");
+ JMSSecurityException jmsse = new JMSSecurityException("Exception while processing SASL init: " + se.getMessage());
jmsse.setLinkedException(se);
jmsse.initCause(se);
throw jmsse;
@@ -138,8 +136,7 @@ public class AmqpSaslAuthenticator {
sasl.send(response, 0, response.length);
}
} catch (SaslException se) {
- // TODO - Better error message.
- JMSSecurityException jmsse = new JMSSecurityException("Exception while processing SASL step.");
+ JMSSecurityException jmsse = new JMSSecurityException("Exception while processing SASL step: " + se.getMessage());
jmsse.setLinkedException(se);
jmsse.initCause(se);
throw jmsse;
@@ -147,7 +144,10 @@ public class AmqpSaslAuthenticator {
}
private void handleSaslFail() throws JMSSecurityException {
- // TODO - Better error message.
- throw new JMSSecurityException("Client failed to authenticate");
+ if (mechanism != null) {
+ throw new JMSSecurityException("Client failed to authenticate using SASL: " + mechanism.getName());
+ } else {
+ throw new JMSSecurityException("Client failed to authenticate");
+ }
}
}
http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/e4fc8eef/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/message/AmqpJmsMessageBuilder.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/message/AmqpJmsMessageBuilder.java b/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/message/AmqpJmsMessageBuilder.java
index fe87642..15f6d1d 100644
--- a/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/message/AmqpJmsMessageBuilder.java
+++ b/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/message/AmqpJmsMessageBuilder.java
@@ -80,7 +80,6 @@ public class AmqpJmsMessageBuilder {
return result;
}
- // TODO
throw new IOException("Could not create a JMS message from incoming message");
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org