From 298ccf2a77bde24b2bc333cbb34acb0338435388 Mon Sep 17 00:00:00 2001 From: James Strachan Date: Mon, 19 Dec 2005 16:19:51 +0000 Subject: [PATCH] avoided NPE in a number of test cases git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@357717 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/java/org/activemq/broker/AbstractConnection.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/activemq-core/src/main/java/org/activemq/broker/AbstractConnection.java b/activemq-core/src/main/java/org/activemq/broker/AbstractConnection.java index e42e60d93a..b80bbafef4 100755 --- a/activemq-core/src/main/java/org/activemq/broker/AbstractConnection.java +++ b/activemq-core/src/main/java/org/activemq/broker/AbstractConnection.java @@ -111,7 +111,9 @@ public abstract class AbstractConnection implements Service, Connection, Task, C this.connector = connector; this.broker = broker; - this.statistics.setParent(connector.getStatistics()); + if (connector != null) { + this.statistics.setParent(connector.getStatistics()); + } if( taskRunnerFactory != null ) { taskRunner = taskRunnerFactory.createTaskRunner( this );