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
This commit is contained in:
James Strachan 2005-12-19 16:19:51 +00:00
parent 7c7cca9dfb
commit 298ccf2a77
1 changed files with 3 additions and 1 deletions

View File

@ -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 );