geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbarr...@apache.org
Subject [07/23] geode-native git commit: GEODE-2741: Code cleanup to move to std::shared_ptr
Date Tue, 06 Jun 2017 17:56:33 GMT
http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/src/RegionXmlCreation.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/RegionXmlCreation.cpp b/src/cppcache/src/RegionXmlCreation.cpp
index 3c937e2..37de2e0 100644
--- a/src/cppcache/src/RegionXmlCreation.cpp
+++ b/src/cppcache/src/RegionXmlCreation.cpp
@@ -49,8 +49,8 @@ void RegionXmlCreation::createRoot(Cache* cache) {
     //  if(cache->m_cacheImpl->getDefaultPool() == nullptr)
     {
       // we may need to initialize default pool
-      if (regAttrs->getEndpoints() == NULL) {
-        if (regAttrs->getPoolName() == NULL) {
+      if (regAttrs->getEndpoints() == nullptr) {
+        if (regAttrs->getPoolName() == nullptr) {
           PoolPtr pool = CacheFactory::createOrGetDefaultPool();
 
           if (pool == nullptr) {
@@ -87,7 +87,7 @@ RegionXmlCreation::~RegionXmlCreation() {
   std::vector<RegionXmlCreation*>::iterator start = subRegions.begin();
   while (start != subRegions.end()) {
     delete *start;
-    *start = NULL;
+    *start = nullptr;
     ++start;
   }
 }

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/src/RegionXmlCreation.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/RegionXmlCreation.hpp b/src/cppcache/src/RegionXmlCreation.hpp
index 359c245..0c31425 100644
--- a/src/cppcache/src/RegionXmlCreation.hpp
+++ b/src/cppcache/src/RegionXmlCreation.hpp
@@ -41,7 +41,7 @@ class Cache;
 class CPPCACHE_EXPORT RegionXmlCreation {
  private:
   /** An <code>AttributesFactory</code> for creating default
-    * <code>RegionAttribute</code>s */
+   * <code>RegionAttribute</code>s */
   AttributesFactory attrFactory;
 
   /** The name of this region */
@@ -97,7 +97,7 @@ class CPPCACHE_EXPORT RegionXmlCreation {
    *
    * @throws OutOfMemoryException if the memory allocation failed
    * @throws NotConnectedException if the cache is not connected
-   * @throws InvalidArgumentException if the attributePtr is NULL.
+   * @throws InvalidArgumentException if the attributePtr is nullptr.
    * or if RegionAttributes is null or if regionName is null,
    * the empty   string, or contains a '/'
    * @throws RegionExistsException
@@ -113,7 +113,7 @@ class CPPCACHE_EXPORT RegionXmlCreation {
    *
    * @throws OutOfMemoryException if the memory allocation failed
    * @throws NotConnectedException if the cache is not connected
-   * @throws InvalidArgumentException if the attributePtr is NULL.
+   * @throws InvalidArgumentException if the attributePtr is nullptr.
    * or if RegionAttributes is null or if regionName is null,
    * the empty string,or contains a '/'
    * @throws RegionExistsException

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/src/RemoteQuery.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/RemoteQuery.cpp b/src/cppcache/src/RemoteQuery.cpp
index 3fbb411..2c37595 100644
--- a/src/cppcache/src/RemoteQuery.cpp
+++ b/src/cppcache/src/RemoteQuery.cpp
@@ -66,7 +66,7 @@ SelectResultsPtr RemoteQuery::execute(uint32_t timeout, const char* func,
     throw IllegalArgumentException(exMsg);
   }
   ThinClientPoolDM* pool = dynamic_cast<ThinClientPoolDM*>(tcdm);
-  if (pool != NULL) {
+  if (pool != nullptr) {
     pool->getStats().incQueryExecutionId();
   }
   /*get the start time for QueryExecutionTime stat*/
@@ -105,7 +105,7 @@ SelectResultsPtr RemoteQuery::execute(uint32_t timeout, const char* func,
   }
 
   /*update QueryExecutionTime stat */
-  if (pool != NULL) {
+  if (pool != nullptr) {
     Utils::updateStatOpTime(
         pool->getStats().getStats(),
         PoolStatType::getInstance()->getQueryExecutionTimeId(),
@@ -137,7 +137,7 @@ GfErrType RemoteQuery::executeNoThrow(uint32_t timeout, TcrMessageReply& reply,
 
     GfErrType err = GF_NOERR;
     LOGFINEST("%s: sending request for query: %s", func, m_queryString.c_str());
-    if (tcdm == NULL) {
+    if (tcdm == nullptr) {
       tcdm = m_tccdm;
     }
     err = tcdm->sendSyncRequest(msg, reply);
@@ -160,7 +160,7 @@ GfErrType RemoteQuery::executeNoThrow(uint32_t timeout, TcrMessageReply& reply,
 
     GfErrType err = GF_NOERR;
     LOGFINEST("%s: sending request for query: %s", func, m_queryString.c_str());
-    if (tcdm == NULL) {
+    if (tcdm == nullptr) {
       tcdm = m_tccdm;
     }
     err = tcdm->sendSyncRequest(msg, reply);

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/src/RemoteQueryService.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/RemoteQueryService.cpp b/src/cppcache/src/RemoteQueryService.cpp
index 9240243..095c7e7 100644
--- a/src/cppcache/src/RemoteQueryService.cpp
+++ b/src/cppcache/src/RemoteQueryService.cpp
@@ -288,7 +288,7 @@ void RemoteQueryService::invokeCqConnectedListeners(ThinClientPoolDM* pool,
   }
   std::string poolName;
   pool = dynamic_cast<ThinClientPoolDM*>(m_tccdm);
-  if (pool != NULL) {
+  if (pool != nullptr) {
     poolName = pool->getName();
     CqPoolsConnected::iterator itr = m_CqPoolsConnected.find(poolName);
     if (itr != m_CqPoolsConnected.end() && itr->second == connected) {

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/src/SerializationRegistry.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/SerializationRegistry.cpp b/src/cppcache/src/SerializationRegistry.cpp
index b9ff536..2c148d0 100644
--- a/src/cppcache/src/SerializationRegistry.cpp
+++ b/src/cppcache/src/SerializationRegistry.cpp
@@ -89,15 +89,15 @@ class TheTypeMap : private NonCopyable, private NonAssignable {
   TheTypeMap();
 
   virtual ~TheTypeMap() {
-    if (m_map != NULL) {
+    if (m_map != nullptr) {
       delete m_map;
     }
 
-    if (m_map2 != NULL) {
+    if (m_map2 != nullptr) {
       delete m_map2;
     }
 
-    if (m_pdxTypemap != NULL) {
+    if (m_pdxTypemap != nullptr) {
       delete m_pdxTypemap;
     }
   }
@@ -370,7 +370,7 @@ SerializablePtr SerializationRegistry::deserialize(DataInput& input,
     compId |= ((static_cast<int64_t>(classId)) << 32);
   }
 
-  TypeFactoryMethod createType = NULL;
+  TypeFactoryMethod createType = nullptr;
 
   if (compId == GeodeTypeIdsImpl::FixedIDByte) {
     int8_t fixedId;
@@ -394,7 +394,7 @@ SerializablePtr SerializationRegistry::deserialize(DataInput& input,
   } else {
     theTypeMap::instance()->find(compId, createType);
   }
-  if (createType == NULL) {
+  if (createType == nullptr) {
     if (findinternal) {
       LOGERROR(
           "Unregistered class ID %d during deserialization: Did the "
@@ -489,15 +489,10 @@ int32_t SerializationRegistry::GetPDXIdForType(const char* poolName,
                                                SerializablePtr pdxType) {
   PoolPtr pool = nullptr;
 
-  if (poolName == NULL) {
-    const HashMapOfPools& pools = PoolManager::getAll();
-    if (pools.size() > 0) {
-      for (HashMapOfPools::Iterator iter = pools.begin(); iter != pools.end();
-           ++iter) {
-        PoolPtr currPool(iter.second());
-        pool = currPool;
-        break;
-      }
+  if (poolName == nullptr) {
+    for (const auto& iter : PoolManager::getAll()) {
+      pool = iter.second;
+      break;
     }
   } else {
     pool = PoolManager::find(poolName);
@@ -514,12 +509,10 @@ SerializablePtr SerializationRegistry::GetPDXTypeById(const char* poolName,
                                                       int32_t typeId) {
   PoolPtr pool = nullptr;
 
-  if (poolName == NULL) {
-    const HashMapOfPools& pools = PoolManager::getAll();
-    if (pools.size() > 0) {
-      HashMapOfPools::Iterator iter = pools.begin();
-      PoolPtr currPool(iter.second());
-      pool = currPool;
+  if (poolName == nullptr) {
+    for (const auto& iter : PoolManager::getAll()) {
+      pool = iter.second;
+      break;
     }
   } else {
     pool = PoolManager::find(poolName);
@@ -551,13 +544,9 @@ SerializablePtr SerializationRegistry::GetEnum(int32_t val) {
 
 PoolPtr SerializationRegistry::getPool() {
   PoolPtr pool = nullptr;
-  const HashMapOfPools& pools = PoolManager::getAll();
-  if (pools.size() > 0) {
-    for (HashMapOfPools::Iterator iter = pools.begin(); iter != pools.end();
-         ++iter) {
-      pool = iter.second();
-      break;
-    }
+  for (const auto& iter: PoolManager::getAll()) {
+    pool = iter.second;
+    break;
   }
   return pool;
 }

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/src/SerializationRegistry.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/SerializationRegistry.hpp b/src/cppcache/src/SerializationRegistry.hpp
index 211c35e..846b7cc 100644
--- a/src/cppcache/src/SerializationRegistry.hpp
+++ b/src/cppcache/src/SerializationRegistry.hpp
@@ -66,7 +66,7 @@ class CPPCACHE_EXPORT SerializationRegistry {
    */
   inline static void serialize(const Serializable* obj, DataOutput& output,
                                bool isDelta = false) {
-    if (obj == NULL) {
+    if (obj == nullptr) {
       output.write(static_cast<int8_t>(GeodeTypeIds::NullObj));
     } else {
       int8_t typeId = obj->typeId();

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/src/ServerLocation.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/ServerLocation.hpp b/src/cppcache/src/ServerLocation.hpp
index aea711e..ca7661a 100644
--- a/src/cppcache/src/ServerLocation.hpp
+++ b/src/cppcache/src/ServerLocation.hpp
@@ -129,21 +129,6 @@ class CPPCACHE_EXPORT ServerLocation : public Serializable {
   }
 
   bool operator==(const ServerLocation& rhs) const {
-    /*char server1[256];
-    char server2[256];
-    size_t len = 0;
-     if (m_serverName != nullptr && rhs.getServerName( ).c_str() != NULL) {
-      ACE_INET_Addr addr1( m_port, m_serverName->asChar() );
-      len = strlen(addr1.get_host_addr());
-      memcpy(server1, addr1.get_host_addr(), len);
-      server1[len] = '\0';
-
-      ACE_INET_Addr addr2( rhs.getPort( ), rhs.getServerName( ).c_str());
-      len = strlen(addr2.get_host_addr());
-      memcpy(server2, addr2.get_host_addr(), len);
-      server2[len] = '\0';
-    }*/
-
     return (!strcmp(m_serverName->asChar(), rhs.getServerName().c_str()) &&
             (m_port == rhs.getPort()));
   }
@@ -160,7 +145,7 @@ class CPPCACHE_EXPORT ServerLocation : public Serializable {
     return m_epString;
   }
 
-  inline int hashcode() {
+  inline int hashcode() const {
     int prime = 31;
     int result = 1;
     // result = prime * result + ((hostName == null) ? 0 : hostName.hashCode());
@@ -179,4 +164,17 @@ class CPPCACHE_EXPORT ServerLocation : public Serializable {
 }  // namespace geode
 }  // namespace apache
 
+namespace std {
+
+template <>
+struct hash<apache::geode::client::ServerLocation> {
+  typedef apache::geode::client::ServerLocation argument_type;
+  typedef size_t result_type;
+  size_t operator()(const apache::geode::client::ServerLocation& val) const {
+    return val.hashcode();
+  }
+};
+
+}  // namespace std
+
 #endif  // GEODE_SERVERLOCATION_H_

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/src/SharedPtr.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/SharedPtr.cpp b/src/cppcache/src/SharedPtr.cpp
index c175b3e..5df113c 100644
--- a/src/cppcache/src/SharedPtr.cpp
+++ b/src/cppcache/src/SharedPtr.cpp
@@ -23,8 +23,8 @@
 using namespace apache::geode::client;
 
 void SPEHelper::throwNullPointerException(const char* ptrtype) {
-  throw NullPointerException(Utils::demangleTypeName(ptrtype)->asChar(), NULL,
-                             true);
+  throw NullPointerException(Utils::demangleTypeName(ptrtype)->asChar(),
+                             nullptr, true);
 }
 
 void SPEHelper::throwClassCastException(const char* msg, const char* fromType,

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/src/SslSockStream.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/SslSockStream.cpp b/src/cppcache/src/SslSockStream.cpp
index 80e40ce..d75bb83 100644
--- a/src/cppcache/src/SslSockStream.cpp
+++ b/src/cppcache/src/SslSockStream.cpp
@@ -26,7 +26,7 @@ namespace client {
 
 void *SslSockStream::getACESSLFuncPtr(const char *function_name) {
   void *func = m_dll.symbol(function_name);
-  if (func == NULL) {
+  if (func == nullptr) {
     char msg[1000];
     ACE_OS::snprintf(msg, 1000, "cannot find function %s in library %s",
                      function_name, "cryptoImpl");
@@ -63,18 +63,18 @@ void SslSockStream::initACESSLFuncPtrs() {
 
 SslSockStream::SslSockStream(ACE_SOCKET sock, const char *pubkey,
                              const char *privkey)
-    : m_ctx(NULL),
+    : m_ctx(nullptr),
       m_sock(sock),
       m_pubkey(pubkey),
       m_privkey(privkey),
-      gf_initSslImpl_Ptr(NULL),
-      gf_clearSslImpl_Ptr(NULL),
-      gf_set_option_Ptr(NULL),
-      gf_listen_Ptr(NULL),
-      gf_connect_Ptr(NULL),
-      gf_recv_n_Ptr(NULL),
-      gf_send_n_Ptr(NULL),
-      gf_get_local_addr_Ptr(NULL) {}
+      gf_initSslImpl_Ptr(nullptr),
+      gf_clearSslImpl_Ptr(nullptr),
+      gf_set_option_Ptr(nullptr),
+      gf_listen_Ptr(nullptr),
+      gf_connect_Ptr(nullptr),
+      gf_recv_n_Ptr(nullptr),
+      gf_send_n_Ptr(nullptr),
+      gf_get_local_addr_Ptr(nullptr) {}
 
 void SslSockStream::init() {
   initACESSLFuncPtrs();
@@ -113,7 +113,7 @@ int SslSockStream::get_local_addr(ACE_Addr &addr) const {
 
 int SslSockStream::close() {
   gf_clearSslImpl_Ptr(m_ctx);
-  m_ctx = NULL;
+  m_ctx = nullptr;
   return 0;
 }
 

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/src/StackFrame.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/StackFrame.hpp b/src/cppcache/src/StackFrame.hpp
index 197fcf6..af2fe7e 100644
--- a/src/cppcache/src/StackFrame.hpp
+++ b/src/cppcache/src/StackFrame.hpp
@@ -28,7 +28,10 @@
 
 #ifdef _WIN32
 #include <Windows.h>
+#pragma warning(push)
+#pragma warning(disable : 4091)
 #include <DbgHelp.h>
+#pragma warning(pop)
 #else
 // Since we dont compile with g++ on Sun
 #ifdef _SOLARIS
@@ -76,7 +79,7 @@ class StackFrame {
     m_string[0] = 0;
     int status = 0;
     char* symbol = extractSymbol(btline);
-    char* demangled = NULL;
+    char* demangled = nullptr;
 #ifdef _SOLARIS
     demangled = new char[DEMANGLED_SYMBOL_BUFSIZE];
     status = cplus_demangle(symbol, demangled, DEMANGLED_SYMBOL_BUFSIZE);
@@ -129,8 +132,8 @@ class StackFrame {
     } else {
       sscanf(btline, "%[^ ] [%[x01-9a-f]]", m_module, m_offset);
     }
-    char* shortmodule = NULL;
-    if (NULL != (shortmodule = strrchr(m_module, '/'))) {
+    char* shortmodule = nullptr;
+    if (nullptr != (shortmodule = strrchr(m_module, '/'))) {
       char* tmp =
           new char[btlen + 1];  // COVERTY --> 30298 Out-of-bounds access
       ACE_OS::strncpy(tmp, shortmodule + 1, btlen);

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/src/StackTrace.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/StackTrace.cpp b/src/cppcache/src/StackTrace.cpp
index 68bcd5d..48d4a17 100644
--- a/src/cppcache/src/StackTrace.cpp
+++ b/src/cppcache/src/StackTrace.cpp
@@ -65,7 +65,7 @@ void StackTrace::addFrame(std::list<std::string>& frames) {
   HANDLE process;
 
   process = GetCurrentProcess();
-  SymInitialize(process, NULL, TRUE);
+  SymInitialize(process, nullptr, TRUE);
 
   typedef USHORT(WINAPI * CaptureStackBackTraceType)(
       __in ULONG, __in ULONG, __out PVOID*, __out_opt PULONG);
@@ -76,7 +76,7 @@ void StackTrace::addFrame(std::list<std::string>& frames) {
     return;
   }
 
-  framesCounts = func(0, 62, stack, NULL);
+  framesCounts = func(0, 62, stack, nullptr);
   symbol = (SYMBOL_INFO*)calloc(sizeof(SYMBOL_INFO) + 256 * sizeof(char), 1);
   symbol->MaxNameLen = 255;
   symbol->SizeOfStruct = sizeof(SYMBOL_INFO);

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/src/Struct.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/Struct.cpp b/src/cppcache/src/Struct.cpp
index 314b5ee..8135256 100644
--- a/src/cppcache/src/Struct.cpp
+++ b/src/cppcache/src/Struct.cpp
@@ -22,14 +22,12 @@ namespace apache {
 namespace geode {
 namespace client {
 
-Struct::Struct() : m_parent(NULL), m_lastAccessIndex(0) {}
+Struct::Struct() : m_parent(nullptr), m_lastAccessIndex(0) {}
 
-Struct::Struct(StructSet* ssPtr, VectorT<SerializablePtr>& fieldValues) {
+Struct::Struct(StructSet* ssPtr, std::vector<SerializablePtr>& fieldValues) {
   m_parent = ssPtr;
-  int32_t vecsize = fieldValues.size();
-  for (int32_t i = 0; i < vecsize; i++) {
-    m_fieldValues.push_back(fieldValues[i]);
-  }
+  m_fieldValues.insert(m_fieldValues.end(), fieldValues.begin(),
+                       fieldValues.end());
   m_lastAccessIndex = 0;
 }
 
@@ -59,7 +57,9 @@ void Struct::toData(DataOutput& output) const {
   throw UnsupportedOperationException("Struct::toData: should not be called.");
 }
 
-int32_t Struct::length() const { return m_fieldValues.size(); }
+int32_t Struct::length() const {
+  return static_cast<int32_t>(m_fieldValues.size());
+}
 
 Serializable* Struct::fromData(DataInput& input) {
   int8_t classType;
@@ -70,12 +70,12 @@ Serializable* Struct::fromData(DataInput& input) {
   int32_t numOfFields;
   input.readArrayLen(&numOfFields);
 
-  m_parent = NULL;
+  m_parent = nullptr;
   for (int i = 0; i < numOfFields; i++) {
     CacheableStringPtr fieldName;
     // input.readObject(fieldName);
     input.readNativeString(fieldName);
-    m_fieldNames.insert(fieldName, CacheableInt32::create(i));
+    m_fieldNames.emplace(fieldName, CacheableInt32::create(i));
   }
   int32_t lengthForTypes;
   input.readArrayLen(&lengthForTypes);
@@ -96,18 +96,16 @@ Serializable* Struct::fromData(DataInput& input) {
   return this;
 }
 
-const char* Struct::getFieldName(int32_t index) {
-  if (m_parent != NULL) {
+const char* Struct::getFieldName(const int32_t index) const {
+  if (m_parent != nullptr) {
     return m_parent->getFieldName(index);
   } else {
-    for (HashMapT<CacheableStringPtr, CacheableInt32Ptr>::Iterator iter =
-             m_fieldNames.begin();
-         iter != m_fieldNames.end(); ++iter) {
-      if (*(iter.second()) == index) return iter.first()->asChar();
+    for (const auto& iter : m_fieldNames) {
+      if ((iter.second)->value() == index) return iter.first->asChar();
     }
   }
 
-  return NULL;
+  return nullptr;
 }
 
 const SerializablePtr Struct::operator[](int32_t index) const {
@@ -120,14 +118,13 @@ const SerializablePtr Struct::operator[](int32_t index) const {
 
 const SerializablePtr Struct::operator[](const char* fieldName) const {
   int32_t index;
-  if (m_parent == NULL) {
-    CacheableStringPtr fName = CacheableString::create(fieldName);
-    HashMapT<CacheableStringPtr, CacheableInt32Ptr>::Iterator iter =
-        m_fieldNames.find(fName);
+  if (m_parent == nullptr) {
+    auto fName = CacheableString::create(fieldName);
+    const auto& iter = m_fieldNames.find(fName);
     if (iter == m_fieldNames.end()) {
       throw OutOfRangeException("Struct: fieldName not found.");
     }
-    index = iter.second()->value();
+    index = iter->second->value();
   } else {
     index = m_parent->getFieldIndex(fieldName);
   }

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/src/StructSetImpl.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/StructSetImpl.cpp b/src/cppcache/src/StructSetImpl.cpp
index 3c8ce0f..667a90f 100644
--- a/src/cppcache/src/StructSetImpl.cpp
+++ b/src/cppcache/src/StructSetImpl.cpp
@@ -15,11 +15,9 @@
  * limitations under the License.
  */
 
-#include "StructSetImpl.hpp"
+#include <vector>
 
-/**
- * @file
- */
+#include "StructSetImpl.hpp"
 
 using namespace apache::geode::client;
 
@@ -43,7 +41,7 @@ StructSetImpl::StructSetImpl(
   // LOGDEBUG("FieldNames = %d and Values = %d", numOfFields, numOfValues);
   m_structVector = CacheableVector::create();
   while (valStoredCnt < numOfValues) {
-    VectorT<SerializablePtr> tmpVec;
+    std::vector<SerializablePtr> tmpVec;
     for (size_t i = 0; i < numOfFields; i++) {
       tmpVec.push_back(response->operator[](valStoredCnt++));
     }
@@ -86,7 +84,7 @@ const char* StructSetImpl::getFieldName(int32_t index) {
        iter != m_fieldNameIndexMap.end(); ++iter) {
     if (iter->second == index) return iter->first.c_str();
   }
-  return NULL;
+  return nullptr;
 }
 
 SelectResults::Iterator StructSetImpl::begin() const {

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/src/SystemProperties.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/SystemProperties.cpp b/src/cppcache/src/SystemProperties.cpp
index e17c1e5..f9675f7 100644
--- a/src/cppcache/src/SystemProperties.cpp
+++ b/src/cppcache/src/SystemProperties.cpp
@@ -173,22 +173,22 @@ const bool DefaultReadTimeoutUnitInMillis = false;
 const bool DefaultOnClientDisconnectClearPdxTypeIds = false;
 }  // namespace
 
-LibraryAuthInitializeFn SystemProperties::managedAuthInitializeFn = NULL;
+LibraryAuthInitializeFn SystemProperties::managedAuthInitializeFn = nullptr;
 
 SystemProperties::SystemProperties(const PropertiesPtr& propertiesPtr,
                                    const char* configFile)
     : m_statisticsSampleInterval(DefaultSamplingInterval),
       m_statisticsEnabled(DefaultSamplingEnabled),
       m_appDomainEnabled(DefaultAppDomainEnabled),
-      m_statisticsArchiveFile(NULL),
-      m_logFilename(NULL),
+      m_statisticsArchiveFile(nullptr),
+      m_logFilename(nullptr),
       m_logLevel(DefaultLogLevel),
       m_sessions(0 /* setup  later in processProperty */),
-      m_name(NULL),
+      m_name(nullptr),
       m_debugStackTraceEnabled(DefaultDebugStackTraceEnabled),
       m_crashDumpEnabled(DefaultCrashDumpEnabled),
       m_disableShufflingEndpoint(false),
-      m_cacheXMLFile(NULL),
+      m_cacheXMLFile(nullptr),
       m_logFileSizeLimit(DefaultLogFileSizeLimit),
       m_logDiskSpaceLimit(DefaultLogDiskSpaceLimit),
       m_statsFileSizeLimit(DefaultStatsFileSizeLimit),
@@ -207,7 +207,7 @@ SystemProperties::SystemProperties(const PropertiesPtr& propertiesPtr,
       m_securityClientDhAlgo(nullptr),
       m_securityClientKsPath(nullptr),
       m_authInitializer(nullptr),
-      m_durableClientId(NULL),
+      m_durableClientId(nullptr),
       m_durableTimeout(DefaultDurableTimeout),
       m_connectTimeout(DefaultConnectTimeout),
       m_connectWaitTimeout(DefaultConnectWaitTimeout),
@@ -216,10 +216,10 @@ SystemProperties::SystemProperties(const PropertiesPtr& propertiesPtr,
       m_autoReadyForEvents(DefaultAutoReadyForEvents),
       m_sslEnabled(DefaultSslEnabled),
       m_timestatisticsEnabled(DefaultTimeStatisticsEnabled),
-      m_sslKeyStore(NULL),
-      m_sslTrustStore(NULL),
-      m_sslKeystorePassword(NULL),  // adongre: Added for Ticket #758
-      m_conflateEvents(NULL),
+      m_sslKeyStore(nullptr),
+      m_sslTrustStore(nullptr),
+      m_sslKeystorePassword(nullptr),  // adongre: Added for Ticket #758
+      m_conflateEvents(nullptr),
       m_threadPoolSize(DefaultThreadPoolSize),
       m_suspendedTxTimeout(DefaultSuspendedTxTimeout),
       m_tombstoneTimeoutInMSec(DefaultTombstoneTimeout),
@@ -274,7 +274,7 @@ SystemProperties::SystemProperties(const PropertiesPtr& propertiesPtr,
   }
 
   // Load the file from current directory.
-  if (configFile == NULL) {
+  if (configFile == nullptr) {
     givenConfigPtr->load("./geode.properties");
   } else {
     givenConfigPtr->load(configFile);
@@ -514,7 +514,7 @@ void SystemProperties::processProperty(const char* property,
     }
 
   } else if (prop == StatisticsArchiveFile) {
-    if (m_statisticsArchiveFile != NULL) {
+    if (m_statisticsArchiveFile != nullptr) {
       delete[] m_statisticsArchiveFile;
     }
     size_t len = strlen(value) + 1;
@@ -522,10 +522,10 @@ void SystemProperties::processProperty(const char* property,
     ACE_OS::strncpy(m_statisticsArchiveFile, value, len);
 
   } else if (prop == LogFilename) {
-    if (m_logFilename != NULL) {
+    if (m_logFilename != nullptr) {
       delete[] m_logFilename;
     }
-    if (value != NULL) {
+    if (value != nullptr) {
       size_t len = strlen(value) + 1;
       m_logFilename = new char[len];
       ACE_OS::strncpy(m_logFilename, value, len);
@@ -551,61 +551,61 @@ void SystemProperties::processProperty(const char* property,
     }
 
   } else if (prop == Name) {
-    if (m_name != NULL) {
+    if (m_name != nullptr) {
       delete[] m_name;
     }
-    if (value != NULL) {
+    if (value != nullptr) {
       size_t len = strlen(value) + 1;
       m_name = new char[len];
       ACE_OS::strncpy(m_name, value, len);
     }
   } else if (prop == DurableClientId) {
-    if (m_durableClientId != NULL) {
+    if (m_durableClientId != nullptr) {
       delete[] m_durableClientId;
-      m_durableClientId = NULL;
+      m_durableClientId = nullptr;
     }
-    if (value != NULL) {
+    if (value != nullptr) {
       size_t len = strlen(value) + 1;
       m_durableClientId = new char[len];
       ACE_OS::strncpy(m_durableClientId, value, len);
     }
   } else if (prop == SslKeyStore) {
-    if (m_sslKeyStore != NULL) {
+    if (m_sslKeyStore != nullptr) {
       delete[] m_sslKeyStore;
-      m_sslKeyStore = NULL;
+      m_sslKeyStore = nullptr;
     }
-    if (value != NULL) {
+    if (value != nullptr) {
       size_t len = strlen(value) + 1;
       m_sslKeyStore = new char[len];
       ACE_OS::strncpy(m_sslKeyStore, value, len);
     }
   } else if (prop == SslTrustStore) {
-    if (m_sslTrustStore != NULL) {
+    if (m_sslTrustStore != nullptr) {
       delete[] m_sslTrustStore;
-      m_sslTrustStore = NULL;
+      m_sslTrustStore = nullptr;
     }
-    if (value != NULL) {
+    if (value != nullptr) {
       size_t len = strlen(value) + 1;
       m_sslTrustStore = new char[len];
       ACE_OS::strncpy(m_sslTrustStore, value, len);
     }
     // adongre: Added for Ticket #758
   } else if (prop == SslKeystorePassword) {
-    if (m_sslKeystorePassword != NULL) {
+    if (m_sslKeystorePassword != nullptr) {
       delete[] m_sslKeystorePassword;
-      m_sslKeystorePassword = NULL;
+      m_sslKeystorePassword = nullptr;
     }
-    if (value != NULL) {
+    if (value != nullptr) {
       size_t len = strlen(value) + 1;
       m_sslKeystorePassword = new char[len];
       ACE_OS::strncpy(m_sslKeystorePassword, value, len);
     }
   } else if (prop == ConflateEvents) {
-    if (m_conflateEvents != NULL) {
+    if (m_conflateEvents != nullptr) {
       delete[] m_conflateEvents;
-      m_conflateEvents = NULL;
+      m_conflateEvents = nullptr;
     }
-    if (value != NULL) {
+    if (value != nullptr) {
       size_t len = strlen(value) + 1;
       m_conflateEvents = new char[len];
       ACE_OS::strncpy(m_conflateEvents, value, len);
@@ -615,10 +615,10 @@ void SystemProperties::processProperty(const char* property,
   } else if (prop == LicenseType) {
     // ignore license-type
   } else if (prop == CacheXMLFile) {
-    if (m_cacheXMLFile != NULL) {
+    if (m_cacheXMLFile != nullptr) {
       delete[] m_cacheXMLFile;
     }
-    if (value != NULL) {
+    if (value != nullptr) {
       size_t len = strlen(value) + 1;
       m_cacheXMLFile = new char[len];
       ACE_OS::strncpy(m_cacheXMLFile, value, len);
@@ -927,8 +927,8 @@ void SystemProperties::logSettings() {
 AuthInitializePtr SystemProperties::getAuthLoader() {
   if ((m_authInitializer == nullptr) && (m_AuthIniLoaderLibrary != nullptr &&
                                          m_AuthIniLoaderFactory != nullptr)) {
-    if (managedAuthInitializeFn != NULL &&
-        strchr(m_AuthIniLoaderFactory->asChar(), '.') != NULL) {
+    if (managedAuthInitializeFn != nullptr &&
+        strchr(m_AuthIniLoaderFactory->asChar(), '.') != nullptr) {
       // this is a managed library
       m_authInitializer.reset((*managedAuthInitializeFn)(
           m_AuthIniLoaderLibrary->asChar(), m_AuthIniLoaderFactory->asChar()));
@@ -936,7 +936,7 @@ AuthInitializePtr SystemProperties::getAuthLoader() {
       AuthInitialize* (*funcptr)();
       funcptr = reinterpret_cast<AuthInitialize* (*)()>(getFactoryFunc(
           m_AuthIniLoaderLibrary->asChar(), m_AuthIniLoaderFactory->asChar()));
-      if (funcptr == NULL) {
+      if (funcptr == nullptr) {
         LOGERROR("Failed to acquire handle to AuthInitialize library");
         return nullptr;
       }

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/src/TSSTXStateWrapper.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/TSSTXStateWrapper.cpp b/src/cppcache/src/TSSTXStateWrapper.cpp
index f4c2d45..d737766 100644
--- a/src/cppcache/src/TSSTXStateWrapper.cpp
+++ b/src/cppcache/src/TSSTXStateWrapper.cpp
@@ -29,12 +29,12 @@ namespace geode {
 namespace client {
 ACE_TSS<TSSTXStateWrapper> TSSTXStateWrapper::s_geodeTSSTXState;
 
-TSSTXStateWrapper::TSSTXStateWrapper() { m_txState = NULL; }
+TSSTXStateWrapper::TSSTXStateWrapper() { m_txState = nullptr; }
 
 TSSTXStateWrapper::~TSSTXStateWrapper() {
   if (m_txState) {
     delete m_txState;
-    m_txState = NULL;
+    m_txState = nullptr;
   }
 }
 }  // namespace client

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/src/TXCleaner.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/TXCleaner.cpp b/src/cppcache/src/TXCleaner.cpp
index 7073e90..9990553 100644
--- a/src/cppcache/src/TXCleaner.cpp
+++ b/src/cppcache/src/TXCleaner.cpp
@@ -35,23 +35,24 @@ TXCleaner::TXCleaner(CacheTransactionManagerImpl* cacheTxMgr) {
 
 TXCleaner::~TXCleaner() {
   clean();
-  if (m_txState != NULL) {
+  if (m_txState != nullptr) {
     m_txState->releaseStickyConnection();
     delete m_txState;
-    m_txState = NULL;
+    m_txState = nullptr;
   }
 }
 void TXCleaner::clean() {
-  if (m_txState != NULL && m_txState->getTransactionId().get() != NULL) {
+  if (m_txState != nullptr && m_txState->getTransactionId().get() != nullptr) {
     m_cacheTxMgr->removeTx(m_txState->getTransactionId()->getId());
   }
-  if (m_txStateWrapper != NULL && m_txState != NULL) {
-    m_txStateWrapper->setTXState(NULL);
+  if (m_txStateWrapper != nullptr && m_txState != nullptr) {
+    m_txStateWrapper->setTXState(nullptr);
   }
 }
 
 TXState* TXCleaner::getTXState() {
-  return (m_txStateWrapper == NULL) ? NULL : m_txStateWrapper->getTXState();
+  return (m_txStateWrapper == nullptr) ? nullptr
+                                       : m_txStateWrapper->getTXState();
 }
 }  // namespace client
 }  // namespace geode

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/src/TXCommitMessage.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/TXCommitMessage.cpp b/src/cppcache/src/TXCommitMessage.cpp
index ba7e15b..cdea056 100644
--- a/src/cppcache/src/TXCommitMessage.cpp
+++ b/src/cppcache/src/TXCommitMessage.cpp
@@ -72,9 +72,9 @@ m_processorId = -1;
   int32_t m_farsideBaseMembershipIdLen;
   input.readBytes(&m_farsideBaseMembershipId, &m_farsideBaseMembershipIdLen);
 
-  if (m_farsideBaseMembershipId != NULL) {
+  if (m_farsideBaseMembershipId != nullptr) {
     GF_SAFE_DELETE_ARRAY(m_farsideBaseMembershipId);
-    m_farsideBaseMembershipId = NULL;
+    m_farsideBaseMembershipId = nullptr;
   }
 
   int64_t tid;
@@ -114,9 +114,9 @@ m_processorId = -1;
       // int8_t* bytes;
       // int32_t len;
       // input.readBytes(&bytes, &len);
-      // if ( bytes != NULL ) {
+      // if ( bytes != nullptr ) {
       // GF_SAFE_DELETE_ARRAY(bytes);
-      // bytes = NULL;
+      // bytes = nullptr;
       //}
       input.readInt(&len);
       // memId1.fromData(input);
@@ -164,7 +164,8 @@ Serializable* TXCommitMessage::create() { return new TXCommitMessage(); }
 void TXCommitMessage::apply(Cache* cache) {
   for (VectorOfSharedBase::Iterator iter = m_regions.begin();
        m_regions.end() != iter; iter++) {
-    RegionCommitPtr regionCommit = std::static_pointer_cast<GF_UNWRAP_SP(RegionCommitPtr)>(*iter);
+    RegionCommitPtr regionCommit =
+        std::static_pointer_cast<GF_UNWRAP_SP(RegionCommitPtr)>(*iter);
     regionCommit->apply(cache);
   }
 }

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/src/TXRegionState.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/TXRegionState.cpp b/src/cppcache/src/TXRegionState.cpp
deleted file mode 100644
index fdb0dc7..0000000
--- a/src/cppcache/src/TXRegionState.cpp
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * 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.
- */
-/*
- * TXRegionState.cpp
- *
- *  Created on: 16-Feb-2011
- *      Author: ankurs
- */
-
-#include "TXRegionState.hpp"
-
-namespace apache {
-namespace geode {
-namespace client {
-
-TXRegionState::TXRegionState() {
-  // TODO Auto-generated constructor stub
-}
-
-TXRegionState::~TXRegionState() {
-  // TODO Auto-generated destructor stub
-}
-}  // namespace client
-}  // namespace geode
-}  // namespace apache

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/src/TXRegionState.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/TXRegionState.hpp b/src/cppcache/src/TXRegionState.hpp
deleted file mode 100644
index 1e4635f..0000000
--- a/src/cppcache/src/TXRegionState.hpp
+++ /dev/null
@@ -1,53 +0,0 @@
-#pragma once
-
-#ifndef GEODE_TXREGIONSTATE_H_
-#define GEODE_TXREGIONSTATE_H_
-
-/*
- * 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.
- */
-/*
- * TXRegionState.hpp
- *
- *  Created on: 16-Feb-2011
- *      Author: ankurs
- */
-
-#include <geode/geode_types.hpp>
-#include <geode/HashMapT.hpp>
-#include "TXEntryState.hpp"
-
-using namespace apache::geode::client;
-
-namespace apache {
-namespace geode {
-namespace client {
-
-class TXRegionState : public apache::geode::client::SharedBase {
- public:
-  TXRegionState();
-  virtual ~TXRegionState();
-
- private:
-  HashMapT<CacheableKeyPtr, TXEntryStatePtr> m_entryMods;
-};
-
-_GF_PTR_DEF_(TXRegionState, TXRegionStatePtr);
-}  // namespace client
-}  // namespace geode
-}  // namespace apache
-
-#endif  // GEODE_TXREGIONSTATE_H_

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/src/TXState.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/TXState.cpp b/src/cppcache/src/TXState.cpp
index ad81186..6e01fc7 100644
--- a/src/cppcache/src/TXState.cpp
+++ b/src/cppcache/src/TXState.cpp
@@ -44,7 +44,7 @@ TXState::TXState(Cache* cache) {
    * this constructor nor in any functions that it calls.
    */
   m_suspendedExpiryTaskId = 0;
-  m_pooldm = NULL;
+  m_pooldm = nullptr;
 }
 
 TXState::~TXState() {}
@@ -81,10 +81,7 @@ CacheablePtr TXState::replay(bool isRollback) {
     // LOGFINE("retrying transaction after loss of state in server.  Attempt #"
     // + (i+1));
     try {
-      for (VectorOfSharedBase::Iterator iter = m_operations.begin();
-           m_operations.end() != iter; iter++) {
-        TransactionalOperationPtr operation =
-            std::static_pointer_cast<GF_UNWRAP_SP(TransactionalOperationPtr)>(*iter);
+      for (const auto& operation : m_operations) {
         result = operation->replay(m_cache);
       }
 
@@ -110,10 +107,11 @@ void TXState::releaseStickyConnection() {
   // Since this is called during cleanup or through destructor, we should not
   // throw exception from here,
   // which can cause undefined cleanup.
-  TcrConnection* conn = (*TssConnectionWrapper::s_geodeTSSConn)->getConnection();
-  if (conn != NULL) {
+  TcrConnection* conn =
+      (*TssConnectionWrapper::s_geodeTSSConn)->getConnection();
+  if (conn != nullptr) {
     ThinClientPoolDM* dm = conn->getEndpointObject()->getPoolHADM();
-    if (dm != NULL) {
+    if (dm != nullptr) {
       if (!dm->isSticky()) {
         LOGFINE(
             "Release the sticky connection associated with the transaction");

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/src/TXState.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/TXState.hpp b/src/cppcache/src/TXState.hpp
index 8fafeea..e1b3081 100644
--- a/src/cppcache/src/TXState.hpp
+++ b/src/cppcache/src/TXState.hpp
@@ -27,7 +27,6 @@
  */
 
 #include "TXId.hpp"
-#include "TXRegionState.hpp"
 #include "TransactionalOperation.hpp"
 #include <string>
 
@@ -83,7 +82,7 @@ class TXState {
   std::string epNameStr;
   int32_t nextModSerialNum();
   bool m_replay;
-  VectorOfSharedBase m_operations;
+  std::vector<TransactionalOperationPtr> m_operations;
   Cache* m_cache;
   ThinClientPoolDM* m_pooldm;
   long m_suspendedExpiryTaskId;

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/src/TcpConn.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/TcpConn.cpp b/src/cppcache/src/TcpConn.cpp
index 9253744..3c3747d 100644
--- a/src/cppcache/src/TcpConn.cpp
+++ b/src/cppcache/src/TcpConn.cpp
@@ -63,7 +63,7 @@ int32_t TcpConn::maxSize(ACE_SOCKET sock, int32_t flag, int32_t size) {
   static int32_t max = 32000;
   if (m_maxBuffSizePool <= 0) {
     SystemProperties *props = DistributedSystem::getSystemProperties();
-    if (props != NULL) {
+    if (props != nullptr) {
       max = props->maxSocketBufferSize();
     }
   } else {
@@ -148,18 +148,18 @@ void TcpConn::init() {
   connect();
 }
 
-TcpConn::TcpConn() : m_io(NULL), m_waitSeconds(0), m_maxBuffSizePool(0) {}
+TcpConn::TcpConn() : m_io(nullptr), m_waitSeconds(0), m_maxBuffSizePool(0) {}
 
 TcpConn::TcpConn(const char *ipaddr, uint32_t waitSeconds,
                  int32_t maxBuffSizePool)
-    : m_io(NULL),
+    : m_io(nullptr),
       m_addr(ipaddr),
       m_waitSeconds(waitSeconds),
       m_maxBuffSizePool(maxBuffSizePool) {}
 
 TcpConn::TcpConn(const char *hostname, int32_t port, uint32_t waitSeconds,
                  int32_t maxBuffSizePool)
-    : m_io(NULL),
+    : m_io(nullptr),
       m_addr(port, hostname),
       m_waitSeconds(waitSeconds),
       m_maxBuffSizePool(maxBuffSizePool) {}
@@ -175,7 +175,7 @@ void TcpConn::listen(const char *ipaddr, uint32_t waitSeconds) {
 }
 
 void TcpConn::listen(ACE_INET_Addr addr, uint32_t waitSeconds) {
-  GF_DEV_ASSERT(m_io != NULL);
+  GF_DEV_ASSERT(m_io != nullptr);
 
   ACE_SOCK_Acceptor listener(addr, 1);
   int32_t retVal = 0;
@@ -191,15 +191,15 @@ void TcpConn::listen(ACE_INET_Addr addr, uint32_t waitSeconds) {
     if (lastError == ETIME || lastError == ETIMEDOUT) {
       /* adongre
        * Coverity - II
-      * CID 29270: Calling risky function (SECURE_CODING)[VERY RISKY]. Using
-      * "sprintf" can cause a
-      * buffer overflow when done incorrectly. Because sprintf() assumes an
-      * arbitrarily long string,
-      * callers must be careful not to overflow the actual space of the
-      * destination.
-      * Use snprintf() instead, or correct precision specifiers.
-      * Fix : using ACE_OS::snprintf
-      */
+       * CID 29270: Calling risky function (SECURE_CODING)[VERY RISKY]. Using
+       * "sprintf" can cause a
+       * buffer overflow when done incorrectly. Because sprintf() assumes an
+       * arbitrarily long string,
+       * callers must be careful not to overflow the actual space of the
+       * destination.
+       * Use snprintf() instead, or correct precision specifiers.
+       * Fix : using ACE_OS::snprintf
+       */
       ACE_OS::snprintf(
           msg, 256,
           "TcpConn::listen Attempt to listen timed out after %d seconds.",
@@ -228,7 +228,7 @@ void TcpConn::connect(const char *ipaddr, uint32_t waitSeconds) {
 }
 
 void TcpConn::connect() {
-  GF_DEV_ASSERT(m_io != NULL);
+  GF_DEV_ASSERT(m_io != nullptr);
 
   ACE_INET_Addr ipaddr = m_addr;
   uint32_t waitSeconds = m_waitSeconds;
@@ -284,7 +284,7 @@ void TcpConn::connect() {
 }
 
 void TcpConn::close() {
-  if (m_io != NULL) {
+  if (m_io != nullptr) {
     m_io->close();
     GF_SAFE_DELETE(m_io);
   }
@@ -317,8 +317,8 @@ int32_t TcpConn::socketOp(TcpConn::SockOp op, char *buff, int32_t len,
       }
     }*/
 
-    GF_DEV_ASSERT(m_io != NULL);
-    GF_DEV_ASSERT(buff != NULL);
+    GF_DEV_ASSERT(m_io != nullptr);
+    GF_DEV_ASSERT(buff != nullptr);
 
 #if GF_DEVEL_ASSERTS == 1
     if (len <= 0) {
@@ -389,7 +389,7 @@ int32_t TcpConn::socketOp(TcpConn::SockOp op, char *buff, int32_t len,
 
 //  Return the local port for this TCP connection.
 uint16_t TcpConn::getPort() {
-  GF_DEV_ASSERT(m_io != NULL);
+  GF_DEV_ASSERT(m_io != nullptr);
 
   ACE_INET_Addr localAddr;
   m_io->get_local_addr(*(ACE_Addr *)&localAddr);

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/src/TcpConn.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/TcpConn.hpp b/src/cppcache/src/TcpConn.hpp
index 436a6a4..60ee0a9 100644
--- a/src/cppcache/src/TcpConn.hpp
+++ b/src/cppcache/src/TcpConn.hpp
@@ -118,7 +118,7 @@ class CPPCACHE_EXPORT TcpConn : public Connector {
 
   virtual void setOption(int32_t level, int32_t option, void* val,
                          int32_t len) {
-    GF_DEV_ASSERT(m_io != NULL);
+    GF_DEV_ASSERT(m_io != nullptr);
 
     if (m_io->set_option(level, option, val, len) == -1) {
       int32_t lastError = ACE_OS::last_error();

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/src/TcpSslConn.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/TcpSslConn.cpp b/src/cppcache/src/TcpSslConn.cpp
index fde5c86..3f4935f 100644
--- a/src/cppcache/src/TcpSslConn.cpp
+++ b/src/cppcache/src/TcpSslConn.cpp
@@ -34,7 +34,7 @@ Ssl* TcpSslConn::getSSLImpl(ACE_SOCKET sock, const char* pubkeyfile,
 
   gf_create_SslImpl func =
       reinterpret_cast<gf_create_SslImpl>(m_dll.symbol("gf_create_SslImpl"));
-  if (func == NULL) {
+  if (func == nullptr) {
     char msg[1000];
     ACE_OS::snprintf(msg, 1000,
                      "cannot find function %s in library gf_create_SslImpl",
@@ -59,7 +59,7 @@ void TcpSslConn::createSocket(ACE_SOCKET sock) {
 }
 
 void TcpSslConn::listen(ACE_INET_Addr addr, uint32_t waitSeconds) {
-  GF_DEV_ASSERT(m_ssl != NULL);
+  GF_DEV_ASSERT(m_ssl != nullptr);
 
   int32_t retVal = m_ssl->listen(addr, waitSeconds);
 
@@ -95,7 +95,7 @@ void TcpSslConn::listen(ACE_INET_Addr addr, uint32_t waitSeconds) {
 }
 
 void TcpSslConn::connect() {
-  GF_DEV_ASSERT(m_ssl != NULL);
+  GF_DEV_ASSERT(m_ssl != nullptr);
 
   ACE_OS::signal(SIGPIPE, SIG_IGN);  // Ignore broken pipe
 
@@ -136,20 +136,20 @@ void TcpSslConn::connect() {
 }
 
 void TcpSslConn::close() {
-  if (m_ssl != NULL) {
+  if (m_ssl != nullptr) {
     m_ssl->close();
     gf_destroy_SslImpl func = reinterpret_cast<gf_destroy_SslImpl>(
         m_dll.symbol("gf_destroy_SslImpl"));
     func((void*)m_ssl);
-    m_ssl = NULL;
+    m_ssl = nullptr;
   }
 }
 
 int32_t TcpSslConn::socketOp(TcpConn::SockOp op, char* buff, int32_t len,
                              uint32_t waitSeconds) {
   {
-    GF_DEV_ASSERT(m_ssl != NULL);
-    GF_DEV_ASSERT(buff != NULL);
+    GF_DEV_ASSERT(m_ssl != nullptr);
+    GF_DEV_ASSERT(buff != nullptr);
 
 #if GF_DEVEL_ASSERTS == 1
     if (len <= 0) {
@@ -219,7 +219,7 @@ int32_t TcpSslConn::socketOp(TcpConn::SockOp op, char* buff, int32_t len,
 }
 
 uint16_t TcpSslConn::getPort() {
-  GF_DEV_ASSERT(m_ssl != NULL);
+  GF_DEV_ASSERT(m_ssl != nullptr);
 
   ACE_INET_Addr localAddr;
   m_ssl->getLocalAddr(*(ACE_Addr*)&localAddr);

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/src/TcpSslConn.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/TcpSslConn.hpp b/src/cppcache/src/TcpSslConn.hpp
index 5246ef9..387a95c 100644
--- a/src/cppcache/src/TcpSslConn.hpp
+++ b/src/cppcache/src/TcpSslConn.hpp
@@ -47,16 +47,16 @@ class TcpSslConn : public TcpConn {
   void createSocket(ACE_SOCKET sock);
 
  public:
-  TcpSslConn() : TcpConn(), m_ssl(NULL){};
+  TcpSslConn() : TcpConn(), m_ssl(nullptr){};
 
   TcpSslConn(const char* hostname, int32_t port,
              uint32_t waitSeconds = DEFAULT_CONNECT_TIMEOUT,
              int32_t maxBuffSizePool = 0)
-      : TcpConn(hostname, port, waitSeconds, maxBuffSizePool), m_ssl(NULL){};
+      : TcpConn(hostname, port, waitSeconds, maxBuffSizePool), m_ssl(nullptr){};
 
   TcpSslConn(const char* ipaddr, uint32_t waitSeconds = DEFAULT_CONNECT_TIMEOUT,
              int32_t maxBuffSizePool = 0)
-      : TcpConn(ipaddr, waitSeconds, maxBuffSizePool), m_ssl(NULL){};
+      : TcpConn(ipaddr, waitSeconds, maxBuffSizePool), m_ssl(nullptr){};
 
   // TODO:  Watch out for virt dtor calling virt methods!
 
@@ -73,7 +73,7 @@ class TcpSslConn : public TcpConn {
   void connect();
 
   void setOption(int32_t level, int32_t option, void* val, int32_t len) {
-    GF_DEV_ASSERT(m_ssl != NULL);
+    GF_DEV_ASSERT(m_ssl != nullptr);
 
     if (m_ssl->setOption(level, option, val, len) == -1) {
       int32_t lastError = ACE_OS::last_error();

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/src/TcrChunkedContext.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/TcrChunkedContext.hpp b/src/cppcache/src/TcrChunkedContext.hpp
index c1c12a3..94a4e15 100644
--- a/src/cppcache/src/TcrChunkedContext.hpp
+++ b/src/cppcache/src/TcrChunkedContext.hpp
@@ -57,7 +57,7 @@ class TcrChunkedResult : public SharedBase {
 
  public:
   inline TcrChunkedResult()
-      : m_finalizeSema(NULL),
+      : m_finalizeSema(nullptr),
         m_ex(nullptr),
         m_inSameThread(false),
         appDomainContext(createAppDomainContext()),
@@ -94,7 +94,7 @@ class TcrChunkedResult : public SharedBase {
       m_inSameThread = true;
       return;
     }
-    if (m_finalizeSema != NULL) {
+    if (m_finalizeSema != nullptr) {
       m_finalizeSema->release();
     } else {
       throw NullPointerException("TcrChunkedResult::finalize: null semaphore");
@@ -107,7 +107,7 @@ class TcrChunkedResult : public SharedBase {
    */
   virtual void waitFinalize() const {
     if (m_inSameThread) return;
-    if (m_finalizeSema != NULL) {
+    if (m_finalizeSema != nullptr) {
       m_finalizeSema->acquire();
     } else {
       throw NullPointerException(
@@ -153,7 +153,7 @@ class TcrChunkedContext {
   inline int32_t getLen() const { return m_len; }
 
   void handleChunk(bool inSameThread) {
-    if (m_bytes == NULL) {
+    if (m_bytes == nullptr) {
       // this is the last chunk for some set of chunks
       m_result->finalize(inSameThread);
     } else if (!m_result->exceptionOccurred()) {

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/src/TcrConnection.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/TcrConnection.cpp b/src/cppcache/src/TcrConnection.cpp
index 865203e..1d018a6 100644
--- a/src/cppcache/src/TcrConnection.cpp
+++ b/src/cppcache/src/TcrConnection.cpp
@@ -49,7 +49,7 @@ const int64_t INITIAL_CONNECTION_ID = 26739;
 bool TcrConnection::InitTcrConnection(
     TcrEndpoint* endpointObj, const char* endpoint, Set<uint16_t>& ports,
     bool isClientNotification, bool isSecondary, uint32_t connectTimeout) {
-  m_conn = NULL;
+  m_conn = nullptr;
   m_endpointObj = endpointObj;
   m_poolDM = dynamic_cast<ThinClientPoolDM*>(m_endpointObj->getPoolHADM());
   // add to the connection reference counter of the endpoint
@@ -57,7 +57,7 @@ bool TcrConnection::InitTcrConnection(
   // m_connected = isConnected;
   m_hasServerQueue = NON_REDUNDANT_SERVER;
   m_queueSize = 0;
-  m_dh = NULL;
+  m_dh = nullptr;
   // m_chunksProcessSema = 0;
   m_creationTime = ACE_OS::gettimeofday();
   connectionId = INITIAL_CONNECTION_ID;
@@ -70,7 +70,7 @@ bool TcrConnection::InitTcrConnection(
       m_endpointObj->getConnRefCounter());
   bool isPool = false;
   m_isBeingUsed = false;
-  GF_DEV_ASSERT(endpoint != NULL);
+  GF_DEV_ASSERT(endpoint != nullptr);
   m_endpoint = endpoint;
   // Precondition:
   // 1. isSecondary ==> isClientNotification
@@ -90,7 +90,7 @@ bool TcrConnection::InitTcrConnection(
     m_conn = createConnection(m_endpoint, connectTimeout, 0);
   }
 
-  GF_DEV_ASSERT(m_conn != NULL);
+  GF_DEV_ASSERT(m_conn != nullptr);
 
   DataOutput handShakeMsg;
   bool isNotificationChannel = false;
@@ -161,9 +161,9 @@ bool TcrConnection::InitTcrConnection(
     SystemProperties* sysProp = DistributedSystem::getSystemProperties();
 
     const char* durableId =
-        (sysProp != NULL) ? sysProp->durableClientId() : NULL;
+        (sysProp != nullptr) ? sysProp->durableClientId() : nullptr;
     const uint32_t durableTimeOut =
-        (sysProp != NULL) ? sysProp->durableTimeout() : 0;
+        (sysProp != nullptr) ? sysProp->durableTimeout() : 0;
 
     // Write ClientProxyMembershipID serialized object.
     uint32_t memIdBufferLength;
@@ -387,7 +387,8 @@ bool TcrConnection::InitTcrConnection(
 
       if (error == CONN_NOERR) {
         acceptanceCode = readHandshakeData(1, connectTimeout);
-        LOGDEBUG("Handshake: Got acceptanceCode Finally %d", (*acceptanceCode)[0]);
+        LOGDEBUG("Handshake: Got acceptanceCode Finally %d",
+                 (*acceptanceCode)[0]);
       } else {
         int32_t lastError = ACE_OS::last_error();
         LOGERROR("Handshake failed, errno: %d, server may not be running",
@@ -432,7 +433,7 @@ bool TcrConnection::InitTcrConnection(
     ///////////////////////////////////
     ////////////////////////// 3. Only when handshake is for subscription
     ///////////////////////////////////
-    if (m_poolDM != NULL) {
+    if (m_poolDM != nullptr) {
       if ((m_hasServerQueue == PRIMARY_SERVER ||
            m_hasServerQueue == NON_REDUNDANT_SERVER) &&
           isClientNotification) {
@@ -577,7 +578,7 @@ bool TcrConnection::InitTcrConnection(
 Connector* TcrConnection::createConnection(const char* endpoint,
                                            uint32_t connectTimeout,
                                            int32_t maxBuffSizePool) {
-  Connector* socket = NULL;
+  Connector* socket = nullptr;
   if (DistributedSystem::getSystemProperties()->sslEnabled()) {
     socket = new TcpSslConn(endpoint, connectTimeout, maxBuffSizePool);
   } else {
@@ -590,23 +591,23 @@ Connector* TcrConnection::createConnection(const char* endpoint,
 }
 
 /* The timeout behaviour for different methods is as follows:
-* receive():
-*   Header: default timeout
-*   Body: default timeout
-* sendRequest()/sendRequestForChunkedResponse():
-*  default timeout during send; for receive:
-*   Header: default timeout * default timeout retries to handle large payload
-*           if a timeout other than default timeout is specified then
-*           that is used instead
-*   Body: default timeout
-*/
+ * receive():
+ *   Header: default timeout
+ *   Body: default timeout
+ * sendRequest()/sendRequestForChunkedResponse():
+ *  default timeout during send; for receive:
+ *   Header: default timeout * default timeout retries to handle large payload
+ *           if a timeout other than default timeout is specified then
+ *           that is used instead
+ *   Body: default timeout
+ */
 inline ConnErrType TcrConnection::receiveData(char* buffer, int32_t length,
                                               uint32_t receiveTimeoutSec,
                                               bool checkConnected,
                                               bool isNotificationMessage,
                                               int32_t notPublicApiWithTimeout) {
-  GF_DEV_ASSERT(buffer != NULL);
-  GF_DEV_ASSERT(m_conn != NULL);
+  GF_DEV_ASSERT(buffer != nullptr);
+  GF_DEV_ASSERT(m_conn != nullptr);
 
   // if gfcpp property unit set then sendTimeoutSec will be in millisecond
   // otherwise it will be in second
@@ -660,7 +661,7 @@ inline ConnErrType TcrConnection::receiveData(char* buffer, int32_t length,
     */
     LOGDEBUG("TcrConnection::receiveData length = %d defaultWaitSecs = %d",
              length, defaultWaitSecs);
-    if (m_poolDM != NULL) {
+    if (m_poolDM != nullptr) {
       LOGDEBUG("TcrConnection::receiveData readBytes = %d", readBytes);
       m_poolDM->getStats().incReceivedBytes(static_cast<int64_t>(readBytes));
     }
@@ -688,8 +689,8 @@ inline ConnErrType TcrConnection::sendData(uint32_t& timeSpent,
                                            uint32_t sendTimeoutSec,
                                            bool checkConnected,
                                            int32_t notPublicApiWithTimeout) {
-  GF_DEV_ASSERT(buffer != NULL);
-  GF_DEV_ASSERT(m_conn != NULL);
+  GF_DEV_ASSERT(buffer != nullptr);
+  GF_DEV_ASSERT(m_conn != nullptr);
   bool isPublicApiTimeout = false;
   // if gfcpp property unit set then sendTimeoutSec will be in millisecond
   // otherwise it will be in second
@@ -861,7 +862,7 @@ void TcrConnection::send(const char* buffer, int len, uint32_t sendTimeoutSec,
 void TcrConnection::send(uint32_t& timeSpent, const char* buffer, int len,
                          uint32_t sendTimeoutSec, bool checkConnected,
                          int32_t notPublicApiWithTimeout) {
-  GF_DEV_ASSERT(m_conn != NULL);
+  GF_DEV_ASSERT(m_conn != nullptr);
 
   // LOGINFO("TcrConnection::send: [%p] sending request to endpoint %s;",
   //:  this, m_endpoint);
@@ -891,7 +892,7 @@ void TcrConnection::send(uint32_t& timeSpent, const char* buffer, int len,
 
 char* TcrConnection::receive(size_t* recvLen, ConnErrType* opErr,
                              uint32_t receiveTimeoutSec) {
-  GF_DEV_ASSERT(m_conn != NULL);
+  GF_DEV_ASSERT(m_conn != nullptr);
 
   return readMessage(recvLen, receiveTimeoutSec, false, opErr, true);
 }
@@ -926,7 +927,7 @@ char* TcrConnection::readMessage(size_t* recvLen, uint32_t receiveTimeoutSec,
       if (isNotificationMessage) {
         // fix #752 - do not throw periodic TimeoutException for subscription
         // channels to avoid frequent stack trace processing.
-        return NULL;
+        return nullptr;
       } else {
         throwException(TimeoutException(
             "TcrConnection::readMessage: "
@@ -935,7 +936,7 @@ char* TcrConnection::readMessage(size_t* recvLen, uint32_t receiveTimeoutSec,
     } else {
       if (isNotificationMessage) {
         *opErr = CONN_IOERR;
-        return NULL;
+        return nullptr;
       }
       throwException(GeodeIOException(
           "TcrConnection::readMessage: "
@@ -989,7 +990,7 @@ char* TcrConnection::readMessage(size_t* recvLen, uint32_t receiveTimeoutSec,
     } else {
       if (isNotificationMessage) {
         *opErr = CONN_IOERR;
-        return NULL;
+        return nullptr;
       }
       throwException(
           GeodeIOException("TcrConnection::readMessage: "
@@ -1090,8 +1091,8 @@ void TcrConnection::readMessageChunked(TcrMessageReply& reply,
     FinalizeProcessChunk(TcrMessageReply& reply, uint16_t endpointmemId)
         : m_reply(reply), m_endpointmemId(endpointmemId) {}
     ~FinalizeProcessChunk() {
-      // Enqueue a NULL chunk indicating a wait for processing to complete.
-      m_reply.processChunk(NULL, 0, m_endpointmemId);
+      // Enqueue a nullptr chunk indicating a wait for processing to complete.
+      m_reply.processChunk(nullptr, 0, m_endpointmemId);
     }
   } endProcessChunk(reply, m_endpointObj->getDistributedMemberID());
   bool first = true;
@@ -1514,7 +1515,7 @@ ACE_Time_Value TcrConnection::getLastAccessed() { return m_lastAccessed; }
 uint8_t TcrConnection::getOverrides(SystemProperties* props) {
   const char* conflate = props->conflateEvents();
   uint8_t conflateByte = 0;
-  if (conflate != NULL) {
+  if (conflate != nullptr) {
     if (ACE_OS::strcasecmp(conflate, "true") == 0) {
       conflateByte = 1;
     } else if (ACE_OS::strcasecmp(conflate, "false") == 0) {
@@ -1524,7 +1525,7 @@ uint8_t TcrConnection::getOverrides(SystemProperties* props) {
   /*
   const char * removeUnresponsive = props->removeUnresponsiveClientOverride();
   uint8_t removeByte = 0;
-  if (removeUnresponsive != NULL ) {
+  if (removeUnresponsive != nullptr ) {
   if ( ACE_OS::strcasecmp(removeUnresponsive, "true") == 0 ) {
   removeByte = 1;
   } else if ( ACE_OS::strcasecmp(removeUnresponsive, "false") == 0 ) {
@@ -1533,7 +1534,7 @@ uint8_t TcrConnection::getOverrides(SystemProperties* props) {
   }
   const char * notify = props->notifyBySubscriptionOverride();
   uint8_t notifyByte = 0;
-  if (notify != NULL ) {
+  if (notify != nullptr ) {
   if ( ACE_OS::strcasecmp(notify, "true") == 0 ) {
   notifyByte = 1;
   } else if ( ACE_OS::strcasecmp(notify, "false") == 0 ) {
@@ -1554,13 +1555,13 @@ TcrConnection::~TcrConnection() {
   LOGDEBUG("Tcrconnection destructor %p . conn ref to endopint %d", this,
            m_endpointObj->getConnRefCounter());
   m_endpointObj->addConnRefCounter(-1);
-  if (m_conn != NULL) {
+  if (m_conn != nullptr) {
     LOGDEBUG("closing the connection");
     m_conn->close();
     GF_SAFE_DELETE_CON(m_conn);
   }
 
-  if (m_dh != NULL) {
+  if (m_dh != nullptr) {
     m_dh->clearDhKeys();
     GF_SAFE_DELETE(m_dh);
   }

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/src/TcrConnection.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/TcrConnection.hpp b/src/cppcache/src/TcrConnection.hpp
index 5cd5aa5..547799c 100644
--- a/src/cppcache/src/TcrConnection.hpp
+++ b/src/cppcache/src/TcrConnection.hpp
@@ -54,7 +54,7 @@
   {                           \
     x->close();               \
     delete x;                 \
-    x = NULL;                 \
+    x = nullptr;              \
   }
 
 namespace apache {
@@ -81,29 +81,29 @@ class ThinClientPoolDM;
 class CPPCACHE_EXPORT TcrConnection {
  public:
   /** Create one connection, endpoint is in format of hostname:portno
-  * It will do handshake with j-server. There're 2 types of handshakes:
-  * 1) handshake for request
-  *    send following bytes:
-  *    CLIENT_TO_SERVER
-  *    REPLY_OK
-  *    2 bytes for the length of idenfifier
-  *    a string with "hostname:processId" as identifier
-  *
-  *    if send succeeds, handshake succeeds. Otherwise, construction
-  *    fails.
-  *
-  * 2) handshake for client notification
-  *    send following bytes:
-  *    SERVER_TO_CLIENT
-  *    1 (4 bytes, we can hard-code)
-  *    12345 (4 bytes, we can hard-code)
-  *
-  *    So the total bytes to send are 9
-  *    read one byte from server, it should be CLIENT_TO_SERVER
-  *    Otherwise, construction fails.
-  * @param     ports     List of local ports for connections to endpoint
-  * @param     numPorts  Size of ports list
-  */
+   * It will do handshake with j-server. There're 2 types of handshakes:
+   * 1) handshake for request
+   *    send following bytes:
+   *    CLIENT_TO_SERVER
+   *    REPLY_OK
+   *    2 bytes for the length of idenfifier
+   *    a string with "hostname:processId" as identifier
+   *
+   *    if send succeeds, handshake succeeds. Otherwise, construction
+   *    fails.
+   *
+   * 2) handshake for client notification
+   *    send following bytes:
+   *    SERVER_TO_CLIENT
+   *    1 (4 bytes, we can hard-code)
+   *    12345 (4 bytes, we can hard-code)
+   *
+   *    So the total bytes to send are 9
+   *    read one byte from server, it should be CLIENT_TO_SERVER
+   *    Otherwise, construction fails.
+   * @param     ports     List of local ports for connections to endpoint
+   * @param     numPorts  Size of ports list
+   */
   bool InitTcrConnection(TcrEndpoint* endpointObj, const char* endpoint,
                          Set<uint16_t>& ports,
                          bool isClientNotification = false,
@@ -112,138 +112,139 @@ class CPPCACHE_EXPORT TcrConnection {
 
   TcrConnection(volatile const bool& isConnected)
       : connectionId(0),
-        m_dh(NULL),
-        m_endpoint(NULL),
-        m_endpointObj(NULL),
+        m_dh(nullptr),
+        m_endpoint(nullptr),
+        m_endpointObj(nullptr),
         m_connected(isConnected),
-        m_conn(NULL),
+        m_conn(nullptr),
         m_hasServerQueue(NON_REDUNDANT_SERVER),
         m_queueSize(0),
         m_port(0),
         m_chunksProcessSema(0),
         m_isBeingUsed(false),
         m_isUsed(0),
-        m_poolDM(NULL) {}
+        m_poolDM(nullptr) {}
 
   /* destroy the connection */
   ~TcrConnection();
 
   /**
-  * send a synchronized request to server.
-  *
-  * It will send the buffer, then wait to receive 17 bytes and save in
-  * msg_header.
-  * msg_header[0] is message type.
-  * msg_header[1],msg_header[2],msg_header[3],msg_header[4] will be a 4 bytes
-  * integer,
-  * let's say, msgLen, which specifies the length of next read. byteReads some
-  * number of
-  * call read again for msgLen bytes, and save the bytes into msg_body.
-  * concatenate the msg_header and msg_body into buffer, msg. The msg should be
-  * a '0' ended
-  * string. i.e. If the msg_header plus msg_body has 100 chars, msg should be a
-  * 101 char array
-  * to contain the '0' in the end. We need it to get length of the msg.
-  * Return the msg.
-  *
-  * @param      buffer the buffer to send
-  * @param      len length of the data to send
-  * @param      sendTimeoutSec write timeout in sec
-  * @param      recvLen output parameter for length of the received message
-  * @param      receiveTimeoutSec read timeout in sec
-  * @return     byte arrary of response. '0' ended.
-  * @exception  GeodeIOException  if an I/O error occurs (socket failure).
-  * @exception  TimeoutException  if timeout happens at any of the 3 socket
-  * operation: 1 write, 2 read
-  */
+   * send a synchronized request to server.
+   *
+   * It will send the buffer, then wait to receive 17 bytes and save in
+   * msg_header.
+   * msg_header[0] is message type.
+   * msg_header[1],msg_header[2],msg_header[3],msg_header[4] will be a 4 bytes
+   * integer,
+   * let's say, msgLen, which specifies the length of next read. byteReads some
+   * number of
+   * call read again for msgLen bytes, and save the bytes into msg_body.
+   * concatenate the msg_header and msg_body into buffer, msg. The msg should be
+   * a '0' ended
+   * string. i.e. If the msg_header plus msg_body has 100 chars, msg should be a
+   * 101 char array
+   * to contain the '0' in the end. We need it to get length of the msg.
+   * Return the msg.
+   *
+   * @param      buffer the buffer to send
+   * @param      len length of the data to send
+   * @param      sendTimeoutSec write timeout in sec
+   * @param      recvLen output parameter for length of the received message
+   * @param      receiveTimeoutSec read timeout in sec
+   * @return     byte arrary of response. '0' ended.
+   * @exception  GeodeIOException  if an I/O error occurs (socket failure).
+   * @exception  TimeoutException  if timeout happens at any of the 3 socket
+   * operation: 1 write, 2 read
+   */
   char* sendRequest(const char* buffer, int32_t len, size_t* recvLen,
                     uint32_t sendTimeoutSec = DEFAULT_WRITE_TIMEOUT,
                     uint32_t receiveTimeoutSec = DEFAULT_READ_TIMEOUT_SECS,
                     int32_t request = -1);
 
   /**
-  * send a synchronized request to server for REGISTER_INTEREST_LIST.
-  *
-  * @param      buffer the buffer to send
-  *             len length of the data to send
-  *             message vector, which will return chunked TcrMessage.
-  *             sendTimeoutSec write timeout in sec
-  *             receiveTimeoutSec read timeout in sec
-  * @exception  GeodeIOException  if an I/O error occurs (socket failure).
-  * @exception  TimeoutException  if timeout happens at any of the 3 socket
-  * operation: 1 write, 2 read
-  */
+   * send a synchronized request to server for REGISTER_INTEREST_LIST.
+   *
+   * @param      buffer the buffer to send
+   *             len length of the data to send
+   *             message vector, which will return chunked TcrMessage.
+   *             sendTimeoutSec write timeout in sec
+   *             receiveTimeoutSec read timeout in sec
+   * @exception  GeodeIOException  if an I/O error occurs (socket failure).
+   * @exception  TimeoutException  if timeout happens at any of the 3 socket
+   * operation: 1 write, 2 read
+   */
   void sendRequestForChunkedResponse(
       const TcrMessage& request, int32_t len, TcrMessageReply& message,
       uint32_t sendTimeoutSec = DEFAULT_WRITE_TIMEOUT,
       uint32_t receiveTimeoutSec = DEFAULT_READ_TIMEOUT_SECS);
 
   /**
-  * send an asynchronized request to server. No response is expected.
-  * we need to use it to send CLOSE_CONNECTION msg
-  *
-  * @param      buffer the buffer to send
-  *             len length of the data to send
-  *             sendTimeoutSec write timeout in sec
-  * @return     no return. Because it either succeeds, or throw exception.
-  * @exception  GeodeIOException  if an I/O error occurs (socket failure).
-  * @exception  TimeoutException  if timeout happens at any of the 3 socket
-  * operation: 1 write, 2 read
-  */
+   * send an asynchronized request to server. No response is expected.
+   * we need to use it to send CLOSE_CONNECTION msg
+   *
+   * @param      buffer the buffer to send
+   *             len length of the data to send
+   *             sendTimeoutSec write timeout in sec
+   * @return     no return. Because it either succeeds, or throw exception.
+   * @exception  GeodeIOException  if an I/O error occurs (socket failure).
+   * @exception  TimeoutException  if timeout happens at any of the 3 socket
+   * operation: 1 write, 2 read
+   */
   void send(const char* buffer, int len,
             uint32_t sendTimeoutSec = DEFAULT_WRITE_TIMEOUT,
             bool checkConnected = true);
 
-  void send(uint32_t& timeSpent, const char* buffer, int len,
-            uint32_t sendTimeoutSec = DEFAULT_WRITE_TIMEOUT,
-            bool checkConnected = true, int32_t notPublicApiWithTimeout =
-                                            -2 /*NOT_PUBLIC_API_WITH_TIMEOUT*/);
+  void send(
+      uint32_t& timeSpent, const char* buffer, int len,
+      uint32_t sendTimeoutSec = DEFAULT_WRITE_TIMEOUT,
+      bool checkConnected = true,
+      int32_t notPublicApiWithTimeout = -2 /*NOT_PUBLIC_API_WITH_TIMEOUT*/);
 
   /**
-  * This method is for receiving client notification. It will read 2 times as
-  * reading reply in sendRequest()
-  *
-  * @param      recvLen output parameter for length of the received message
-  * @param      receiveTimeoutSec read timeout in sec
-  * @return     byte arrary of response. '0' ended.
-  * @exception  GeodeIOException  if an I/O error occurs (socket failure).
-  * @exception  TimeoutException  if timeout happens at any of the 3 socket
-  * operation: 1 write, 2 read
-  */
+   * This method is for receiving client notification. It will read 2 times as
+   * reading reply in sendRequest()
+   *
+   * @param      recvLen output parameter for length of the received message
+   * @param      receiveTimeoutSec read timeout in sec
+   * @return     byte arrary of response. '0' ended.
+   * @exception  GeodeIOException  if an I/O error occurs (socket failure).
+   * @exception  TimeoutException  if timeout happens at any of the 3 socket
+   * operation: 1 write, 2 read
+   */
   char* receive(size_t* recvLen, ConnErrType* opErr,
                 uint32_t receiveTimeoutSec = DEFAULT_READ_TIMEOUT_SECS);
 
   //  readMessage is now public
   /**
-  * This method reads a message from the socket connection and returns the byte
-  * array of response.
-  * @param      recvLen output parameter for length of the received message
-  * @param      receiveTimeoutSec read timeout in seconds
-  * @param      doHeaderTimeoutRetries retry when header receive times out
-  * @return     byte array of response. '0' ended.
-  * @exception  GeodeIOException  if an I/O error occurs (socket failure).
-  * @exception  TimeoutException  if timeout happens during read
-  */
+   * This method reads a message from the socket connection and returns the byte
+   * array of response.
+   * @param      recvLen output parameter for length of the received message
+   * @param      receiveTimeoutSec read timeout in seconds
+   * @param      doHeaderTimeoutRetries retry when header receive times out
+   * @return     byte array of response. '0' ended.
+   * @exception  GeodeIOException  if an I/O error occurs (socket failure).
+   * @exception  TimeoutException  if timeout happens during read
+   */
   char* readMessage(size_t* recvLen, uint32_t receiveTimeoutSec,
                     bool doHeaderTimeoutRetries, ConnErrType* opErr,
                     bool isNotificationMessage = false, int32_t request = -1);
 
   /**
-  * This method reads an interest list response  message from the socket
-  * connection and sets the reply message
-  * parameter.
-  * @param      reply response message
-  * @param      receiveTimeoutSec read timeout in sec
-  * @param      doHeaderTimeoutRetries retry when header receive times out
-  * @exception  GeodeIOException  if an I/O error occurs (socket failure).
-  * @exception  TimeoutException  if timeout happens during read
-  */
+   * This method reads an interest list response  message from the socket
+   * connection and sets the reply message
+   * parameter.
+   * @param      reply response message
+   * @param      receiveTimeoutSec read timeout in sec
+   * @param      doHeaderTimeoutRetries retry when header receive times out
+   * @exception  GeodeIOException  if an I/O error occurs (socket failure).
+   * @exception  TimeoutException  if timeout happens during read
+   */
   void readMessageChunked(TcrMessageReply& reply, uint32_t receiveTimeoutSec,
                           bool doHeaderTimeoutRetries);
 
   /**
-  * Send close connection message to the server.
-  */
+   * Send close connection message to the server.
+   */
   void close();
 
   //  Durable clients: return true if server has HA queue.
@@ -278,7 +279,7 @@ class CPPCACHE_EXPORT TcrConnection {
   }
 
   CacheableBytesPtr encryptBytes(CacheableBytesPtr data) {
-    if (m_dh != NULL) {
+    if (m_dh != nullptr) {
       return m_dh->encrypt(data);
     } else {
       return data;
@@ -286,7 +287,7 @@ class CPPCACHE_EXPORT TcrConnection {
   }
 
   CacheableBytesPtr decryptBytes(CacheableBytesPtr data) {
-    if (m_dh != NULL) {
+    if (m_dh != nullptr) {
       return m_dh->decrypt(data);
     } else {
       return data;
@@ -297,9 +298,9 @@ class CPPCACHE_EXPORT TcrConnection {
   int64_t connectionId;
   DiffieHellman* m_dh;
   /**
-  * To read Intantiator message(which meant for java client), here we are
-  * ignoring it
-  */
+   * To read Intantiator message(which meant for java client), here we are
+   * ignoring it
+   */
   void readHandshakeInstantiatorMsg(uint32_t connectTimeout);
 
   /**
@@ -309,18 +310,18 @@ class CPPCACHE_EXPORT TcrConnection {
   uint8_t getOverrides(SystemProperties* props);
 
   /**
-  * To read the from stream
-  */
+   * To read the from stream
+   */
   int32_t readHandShakeInt(uint32_t connectTimeout);
 
   /*
-  * To read the arraysize
-  */
+   * To read the arraysize
+   */
   uint32_t readHandshakeArraySize(uint32_t connectTimeout);
 
   /*
-  * This function reads "numberOfBytes" and ignores it.
-  */
+   * This function reads "numberOfBytes" and ignores it.
+   */
   void readHandShakeBytes(int numberOfBytes, uint32_t connectTimeout);
 
   /** Create a normal or SSL connection */
@@ -329,8 +330,8 @@ class CPPCACHE_EXPORT TcrConnection {
                               int32_t maxBuffSizePool = 0);
 
   /**
-  * Reads bytes from socket and handles error conditions in case of Handshake.
-  */
+   * Reads bytes from socket and handles error conditions in case of Handshake.
+   */
   /* adongre
    * CID 28738: Unsigned compared against 0 (NO_EFFECT)
    * This less-than-zero comparison of an unsigned value is never true.
@@ -340,9 +341,9 @@ class CPPCACHE_EXPORT TcrConnection {
                                       uint32_t connectTimeout);
 
   /**
-  * Reads raw bytes (without appending NULL terminator) from socket and handles
-  * error conditions in case of Handshake.
-  */
+   * Reads raw bytes (without appending nullptr terminator) from socket and
+   * handles error conditions in case of Handshake.
+   */
   /* adongre
    * CID 28739: Unsigned compared against 0 (NO_EFFECT)
    * change the input parameter from unint32_t to int32_t
@@ -353,15 +354,15 @@ class CPPCACHE_EXPORT TcrConnection {
   CacheableBytesPtr readHandshakeRawData(int32_t msgLength,
                                          uint32_t connectTimeout);
   /**
-  * Reads a string from socket and handles error conditions in case of
-  * Handshake.
-  */
+   * Reads a string from socket and handles error conditions in case of
+   * Handshake.
+   */
   CacheableStringPtr readHandshakeString(uint32_t connectTimeout);
 
   /**
-  * Reads a byte array (using initial length) from socket and handles error
-  * conditions in case of Handshake.
-  */
+   * Reads a byte array (using initial length) from socket and handles error
+   * conditions in case of Handshake.
+   */
   CacheableBytesPtr readHandshakeByteArray(uint32_t connectTimeout);
 
   /**

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/src/TcrConnectionManager.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/TcrConnectionManager.cpp b/src/cppcache/src/TcrConnectionManager.cpp
index f46e2d0..b59acc9 100644
--- a/src/cppcache/src/TcrConnectionManager.cpp
+++ b/src/cppcache/src/TcrConnectionManager.cpp
@@ -45,15 +45,15 @@ TcrConnectionManager::TcrConnectionManager(CacheImpl *cache)
     : m_cache(cache),
       m_initGuard(false),
       m_failoverSema(0),
-      m_failoverTask(NULL),
+      m_failoverTask(nullptr),
       m_cleanupSema(0),
-      m_cleanupTask(NULL),
+      m_cleanupTask(nullptr),
       m_pingTaskId(-1),
       m_servermonitorTaskId(-1),
       // Create the queues with flag to not delete the objects
       m_notifyCleanupSemaList(false),
       m_redundancySema(0),
-      m_redundancyTask(NULL),
+      m_redundancyTask(nullptr),
       m_isDurable(false) {
   m_redundancyManager = new ThinClientRedundancyManager(this);
 }
@@ -86,7 +86,7 @@ void TcrConnectionManager::init(bool isPool) {
 
   if (cacheAttributes != nullptr &&
       (cacheAttributes->getRedundancyLevel() > 0 || m_isDurable) &&
-      (endpoints = cacheAttributes->getEndpoints()) != NULL &&
+      (endpoints = cacheAttributes->getEndpoints()) != nullptr &&
       strcmp(endpoints, "none") != 0) {
     initializeHAEndpoints(endpoints);  // no distributaion manager at this point
     m_redundancyManager->initialize(cacheAttributes->getRedundancyLevel());
@@ -126,14 +126,14 @@ void TcrConnectionManager::init(bool isPool) {
 }
 
 void TcrConnectionManager::startFailoverAndCleanupThreads(bool isPool) {
-  if (m_failoverTask == NULL || m_cleanupTask == NULL) {
+  if (m_failoverTask == nullptr || m_cleanupTask == nullptr) {
     ACE_Guard<ACE_Recursive_Thread_Mutex> _guard(m_distMngrsLock);
-    if (m_failoverTask == NULL && !isPool) {
+    if (m_failoverTask == nullptr && !isPool) {
       m_failoverTask = new Task<TcrConnectionManager>(
           this, &TcrConnectionManager::failover, NC_Failover);
       m_failoverTask->start();
     }
-    if (m_cleanupTask == NULL && !isPool) {
+    if (m_cleanupTask == nullptr && !isPool) {
       if (m_redundancyManager->m_HAenabled && !isPool) {
         m_redundancyManager->startPeriodicAck();
       }
@@ -150,7 +150,7 @@ void TcrConnectionManager::close() {
     CacheImpl::expiryTaskManager->cancelTask(m_pingTaskId);
   }
 
-  if (m_failoverTask != NULL) {
+  if (m_failoverTask != nullptr) {
     m_failoverTask->stopNoblock();
     m_failoverSema.release();
     m_failoverTask->wait();
@@ -163,7 +163,7 @@ void TcrConnectionManager::close() {
     if (m_servermonitorTaskId > 0) {
       CacheImpl::expiryTaskManager->cancelTask(m_servermonitorTaskId);
     }
-    if (m_redundancyTask != NULL) {
+    if (m_redundancyTask != nullptr) {
       m_redundancyTask->stopNoblock();
       m_redundancySema.release();
       m_redundancyTask->wait();
@@ -186,7 +186,7 @@ void TcrConnectionManager::readyForEvents() {
 }
 
 TcrConnectionManager::~TcrConnectionManager() {
-  if (m_cleanupTask != NULL) {
+  if (m_cleanupTask != nullptr) {
     m_cleanupTask->stopNoblock();
     m_cleanupSema.release();
     m_cleanupTask->wait();
@@ -260,7 +260,7 @@ void TcrConnectionManager::connect(
   if (m_redundancyManager->m_globalProcessedMarker) {
     TcrHADistributionManager *tcrHADM =
         dynamic_cast<TcrHADistributionManager *>(distMng);
-    if (tcrHADM != NULL) {
+    if (tcrHADM != nullptr) {
       ThinClientHARegion *tcrHARegion =
           dynamic_cast<ThinClientHARegion *>(tcrHADM->m_region);
       tcrHARegion->setProcessedMarker();
@@ -270,7 +270,7 @@ void TcrConnectionManager::connect(
 
 TcrEndpoint *TcrConnectionManager::addRefToTcrEndpoint(std::string endpointName,
                                                        ThinClientBaseDM *dm) {
-  TcrEndpoint *ep = NULL;
+  TcrEndpoint *ep = nullptr;
   /*
   endpointName = Utils::convertHostToCanonicalForm(endpointName.c_str());
   */
@@ -329,7 +329,7 @@ bool TcrConnectionManager::removeRefToEndpoint(TcrEndpoint *ep,
 
 int TcrConnectionManager::processEventIdMap(const ACE_Time_Value &currTime,
                                             const void *) {
-  return m_redundancyManager->processEventIdMap(currTime, NULL);
+  return m_redundancyManager->processEventIdMap(currTime, nullptr);
 }
 
 int TcrConnectionManager::checkConnection(const ACE_Time_Value &,
@@ -413,7 +413,7 @@ GfErrType TcrConnectionManager::registerInterestAllRegions(
   for (std::list<ThinClientBaseDM *>::iterator it = begin; it != end; ++it) {
     TcrHADistributionManager *tcrHADM =
         dynamic_cast<TcrHADistributionManager *>(*it);
-    if (tcrHADM != NULL) {
+    if (tcrHADM != nullptr) {
       if ((opErr = tcrHADM->registerInterestForRegion(ep, request, reply)) !=
           GF_NOERR) {
         if (err == GF_NOERR) {
@@ -438,7 +438,7 @@ GfErrType TcrConnectionManager::sendSyncRequestCq(TcrMessage &request,
   for (std::list<ThinClientBaseDM *>::iterator it = begin; it != end; ++it) {
     TcrHADistributionManager *tcrHADM =
         dynamic_cast<TcrHADistributionManager *>(*it);
-    if (tcrHADM != NULL) {
+    if (tcrHADM != nullptr) {
       return tcrHADM->sendSyncRequestCq(request, reply);
     }
   }

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/src/TcrConnectionManager.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/TcrConnectionManager.hpp b/src/cppcache/src/TcrConnectionManager.hpp
index 28766ac..c902286 100644
--- a/src/cppcache/src/TcrConnectionManager.hpp
+++ b/src/cppcache/src/TcrConnectionManager.hpp
@@ -50,8 +50,8 @@ class ThinClientBaseDM;
 class ThinClientRegion;
 
 /**
-* @brief transport data between caches
-*/
+ * @brief transport data between caches
+ */
 class CPPCACHE_EXPORT TcrConnectionManager {
  public:
   TcrConnectionManager(CacheImpl* cache);
@@ -112,8 +112,9 @@ class CPPCACHE_EXPORT TcrConnectionManager {
                               TcrHADistributionManager* theHADM);
   GfErrType sendSyncRequestRegisterInterest(
       TcrMessage& request, TcrMessageReply& reply, bool attemptFailover = true,
-      TcrEndpoint* endpoint = NULL, TcrHADistributionManager* theHADM = NULL,
-      ThinClientRegion* region = NULL);
+      TcrEndpoint* endpoint = nullptr,
+      TcrHADistributionManager* theHADM = nullptr,
+      ThinClientRegion* region = nullptr);
 
   inline void triggerRedundancyThread() { m_redundancySema.release(); }
 
@@ -155,7 +156,7 @@ class CPPCACHE_EXPORT TcrConnectionManager {
 
   bool removeRefToEndpoint(TcrEndpoint* ep, bool keepEndpoint = false);
   TcrEndpoint* addRefToTcrEndpoint(std::string endpointName,
-                                   ThinClientBaseDM* dm = NULL);
+                                   ThinClientBaseDM* dm = nullptr);
 
   void initializeHAEndpoints(const char* endpointsStr);
   void removeHAEndpoints();

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/src/TcrDistributionManager.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/TcrDistributionManager.cpp b/src/cppcache/src/TcrDistributionManager.cpp
index 4a2c076..735dba6 100644
--- a/src/cppcache/src/TcrDistributionManager.cpp
+++ b/src/cppcache/src/TcrDistributionManager.cpp
@@ -25,7 +25,7 @@ using namespace apache::geode::client;
 TcrDistributionManager::TcrDistributionManager(
     ThinClientRegion* region, TcrConnectionManager& connManager)
     : ThinClientDistributionManager(connManager, region) {
-  GF_R_ASSERT(region != NULL);
+  GF_R_ASSERT(region != nullptr);
   m_clientNotification =
       region->getAttributes()->getClientNotificationEnabled();
 }


Mime
View raw message