[jboss-cvs] JBoss Messaging SVN: r1498 - trunk/src/main/org/jboss/jms/server/destination

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Oct 18 04:09:05 EDT 2006


Author: juha at jboss.org
Date: 2006-10-18 04:09:03 -0400 (Wed, 18 Oct 2006)
New Revision: 1498

Modified:
   trunk/src/main/org/jboss/jms/server/destination/TopicService.java
Log:
Avoid unexplained NPE due to user misconfiguration.

Modified: trunk/src/main/org/jboss/jms/server/destination/TopicService.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/destination/TopicService.java	2006-10-18 08:02:46 UTC (rev 1497)
+++ trunk/src/main/org/jboss/jms/server/destination/TopicService.java	2006-10-18 08:09:03 UTC (rev 1498)
@@ -26,6 +26,8 @@
  * @author <a href="mailto:ovidiu at jboss.org">Ovidiu Feodorov</a>
  * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
  * @author <a href="mailto:alex.fu at novell.com">Alex Fu</a>
+ * @author <a href="mailto:juha at jboss.org">Juha Lindfors</a>
+ *
  * @version <tt>$Revision$</tt>
  *
  * $Id$
@@ -63,7 +65,10 @@
       try
       {
          postOffice = serverPeer.getTopicPostOfficeInstance();
-         
+
+         if (postOffice == null)
+          throw new IllegalArgumentException("Post Office instance not found. Check your destination configuration.");
+
          destination.setPostOffice(postOffice);
            
          // We deploy any queues corresponding to pre-existing durable subscriptions




More information about the jboss-cvs-commits mailing list