Author: tabish
Date: Thu Mar 12 15:48:03 2009
New Revision: 752905
URL: http://svn.apache.org/viewvc?rev=752905&view=rev
Log:
Fix a segfault issue in this test.
Modified:
activemq/activemq-cpp/trunk/src/test/activemq/transport/IOTransportTest.cpp
Modified:
activemq/activemq-cpp/trunk/src/test/activemq/transport/IOTransportTest.cpp
URL:
http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/transport/IOTransportTest.cpp?rev=752905&r1=752904&r2=752905&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/transport/IOTransportTest.cpp
(original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/transport/IOTransportTest.cpp
Thu Mar 12 15:48:03 2009
@@ -21,6 +21,7 @@
#include <activemq/transport/TransportListener.h>
#include <activemq/wireformat/WireFormat.h>
#include <activemq/commands/BaseCommand.h>
+#include <decaf/lang/exceptions/NullPointerException.h>
#include <decaf/util/concurrent/Concurrent.h>
#include <decaf/util/concurrent/CountDownLatch.h>
#include <decaf/util/concurrent/Mutex.h>
@@ -35,6 +36,7 @@
using namespace activemq;
using namespace activemq::transport;
using namespace activemq::exceptions;
+using namespace decaf::lang::exceptions;
////////////////////////////////////////////////////////////////////////////////
class MyCommand : public commands::BaseCommand{
@@ -87,6 +89,11 @@
throw CommandIOException();
}
+ if( inputStream == NULL ) {
+ throw NullPointerException(
+ __FILE__, __LINE__, "InputStream passed is Null" );
+ }
+
decaf::util::Random randGen;
synchronized( inputStream ){