activemq git commit: https://issues.apache.org/jira/browse/AMQ-6125

2016-01-13 Thread tabish
Repository: activemq
Updated Branches:
  refs/heads/activemq-5.13.x b04cfeb8a -> b32be1bb1


https://issues.apache.org/jira/browse/AMQ-6125

Ensure that the redelivery policy is never null in the consumer.
(cherry picked from commit 92870553389ef288d81c4ad670463c4fb1002c69)


Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/b32be1bb
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/b32be1bb
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/b32be1bb

Branch: refs/heads/activemq-5.13.x
Commit: b32be1bb1154368c34f9c4db6b6bf606ed6fbbea
Parents: b04cfeb
Author: Timothy Bish 
Authored: Wed Jan 13 18:08:18 2016 -0500
Committer: Timothy Bish 
Committed: Wed Jan 13 18:09:54 2016 -0500

--
 .../activemq/ActiveMQMessageConsumer.java   | 18 -
 .../org/apache/activemq/bugs/AMQ6125Test.java   | 77 
 2 files changed, 94 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/activemq/blob/b32be1bb/activemq-client/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java
--
diff --git 
a/activemq-client/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java
 
b/activemq-client/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java
index db9c395..3f5167f 100755
--- 
a/activemq-client/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java
+++ 
b/activemq-client/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java
@@ -40,7 +40,20 @@ import javax.jms.MessageListener;
 import javax.jms.TransactionRolledBackException;
 
 import org.apache.activemq.blob.BlobDownloader;
-import org.apache.activemq.command.*;
+import org.apache.activemq.command.ActiveMQBlobMessage;
+import org.apache.activemq.command.ActiveMQDestination;
+import org.apache.activemq.command.ActiveMQMessage;
+import org.apache.activemq.command.ActiveMQObjectMessage;
+import org.apache.activemq.command.ActiveMQTempDestination;
+import org.apache.activemq.command.CommandTypes;
+import org.apache.activemq.command.ConsumerId;
+import org.apache.activemq.command.ConsumerInfo;
+import org.apache.activemq.command.MessageAck;
+import org.apache.activemq.command.MessageDispatch;
+import org.apache.activemq.command.MessageId;
+import org.apache.activemq.command.MessagePull;
+import org.apache.activemq.command.RemoveInfo;
+import org.apache.activemq.command.TransactionId;
 import org.apache.activemq.management.JMSConsumerStatsImpl;
 import org.apache.activemq.management.StatsCapable;
 import org.apache.activemq.management.StatsImpl;
@@ -199,6 +212,9 @@ public class ActiveMQMessageConsumer implements 
MessageAvailableConsumer, StatsC
 
 this.session = session;
 this.redeliveryPolicy = 
session.connection.getRedeliveryPolicyMap().getEntryFor(dest);
+if (this.redeliveryPolicy == null) {
+this.redeliveryPolicy = new RedeliveryPolicy();
+}
 setTransformer(session.getTransformer());
 
 this.info = new ConsumerInfo(consumerId);

http://git-wip-us.apache.org/repos/asf/activemq/blob/b32be1bb/activemq-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ6125Test.java
--
diff --git 
a/activemq-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ6125Test.java 
b/activemq-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ6125Test.java
new file mode 100644
index 000..3b4a982
--- /dev/null
+++ 
b/activemq-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ6125Test.java
@@ -0,0 +1,77 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.bugs;
+
+import static org.junit.Assert.assertNotNull;
+
+import javax.jms.Connection;
+import javax.jms.Message;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageProducer;
+import javax.jms.Queue;
+import javax.jms.Session;
+
+import org.apache.activemq.ActiveMQConnectionFactory;
+import 

activemq git commit: https://issues.apache.org/jira/browse/AMQ-6125

2016-01-13 Thread tabish
Repository: activemq
Updated Branches:
  refs/heads/master b9805f7ac -> 928705533


https://issues.apache.org/jira/browse/AMQ-6125

Ensure that the redelivery policy is never null in the consumer.

Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/92870553
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/92870553
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/92870553

Branch: refs/heads/master
Commit: 92870553389ef288d81c4ad670463c4fb1002c69
Parents: b9805f7
Author: Timothy Bish 
Authored: Wed Jan 13 18:08:18 2016 -0500
Committer: Timothy Bish 
Committed: Wed Jan 13 18:08:18 2016 -0500

--
 .../activemq/ActiveMQMessageConsumer.java   | 18 -
 .../org/apache/activemq/bugs/AMQ6125Test.java   | 77 
 2 files changed, 94 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/activemq/blob/92870553/activemq-client/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java
--
diff --git 
a/activemq-client/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java
 
b/activemq-client/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java
index db9c395..3f5167f 100755
--- 
a/activemq-client/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java
+++ 
b/activemq-client/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java
@@ -40,7 +40,20 @@ import javax.jms.MessageListener;
 import javax.jms.TransactionRolledBackException;
 
 import org.apache.activemq.blob.BlobDownloader;
-import org.apache.activemq.command.*;
+import org.apache.activemq.command.ActiveMQBlobMessage;
+import org.apache.activemq.command.ActiveMQDestination;
+import org.apache.activemq.command.ActiveMQMessage;
+import org.apache.activemq.command.ActiveMQObjectMessage;
+import org.apache.activemq.command.ActiveMQTempDestination;
+import org.apache.activemq.command.CommandTypes;
+import org.apache.activemq.command.ConsumerId;
+import org.apache.activemq.command.ConsumerInfo;
+import org.apache.activemq.command.MessageAck;
+import org.apache.activemq.command.MessageDispatch;
+import org.apache.activemq.command.MessageId;
+import org.apache.activemq.command.MessagePull;
+import org.apache.activemq.command.RemoveInfo;
+import org.apache.activemq.command.TransactionId;
 import org.apache.activemq.management.JMSConsumerStatsImpl;
 import org.apache.activemq.management.StatsCapable;
 import org.apache.activemq.management.StatsImpl;
@@ -199,6 +212,9 @@ public class ActiveMQMessageConsumer implements 
MessageAvailableConsumer, StatsC
 
 this.session = session;
 this.redeliveryPolicy = 
session.connection.getRedeliveryPolicyMap().getEntryFor(dest);
+if (this.redeliveryPolicy == null) {
+this.redeliveryPolicy = new RedeliveryPolicy();
+}
 setTransformer(session.getTransformer());
 
 this.info = new ConsumerInfo(consumerId);

http://git-wip-us.apache.org/repos/asf/activemq/blob/92870553/activemq-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ6125Test.java
--
diff --git 
a/activemq-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ6125Test.java 
b/activemq-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ6125Test.java
new file mode 100644
index 000..3b4a982
--- /dev/null
+++ 
b/activemq-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ6125Test.java
@@ -0,0 +1,77 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.bugs;
+
+import static org.junit.Assert.assertNotNull;
+
+import javax.jms.Connection;
+import javax.jms.Message;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageProducer;
+import javax.jms.Queue;
+import javax.jms.Session;
+
+import org.apache.activemq.ActiveMQConnectionFactory;
+import org.apache.activemq.broker.BrokerService;
+import org.apache.activemq.broker.region.policy.RedeliveryPolicyMap;