GEODE-7418: Fixes issue deserializing unregistered PDX types. (#546)

* GEODE-7418: Fixes issue deserializing unregistered PDX types.
* If a PDX type does not have a domain class or registered serializer then
we now fall back to PdxInstance objects.
* Add test case to reproduce crash deserializing JSON values
* Add test case for serializing non-PDX types
* Test macro cleanup - Fixes test macros to properly handle ;


(cherry picked from commit c932a1d765809dcd8d7a0c0f14a3aa6c98e18a5c)
diff --git a/cppcache/integration-test/.clang-tidy b/cppcache/integration-test/.clang-tidy
index 55e5f46..a3b1d36 100644
--- a/cppcache/integration-test/.clang-tidy
+++ b/cppcache/integration-test/.clang-tidy
@@ -1,5 +1,5 @@
 ---
-Checks:          '-*,clang-diagnostic-*,clang-analyzer-*,-clang-analyzer-alpha*,google-*,-google-readability-todo,-google-runtime-references,-google-default-arguments,-clang-analyzer-core.uninitialized.UndefReturn,-clang-analyzer-core.UndefinedBinaryOperatorResult,-clang-analyzer-optin.cplusplus.VirtualCall,-clang-analyzer-cplusplus.NewDeleteLeaks'
+Checks:          '-*,clang-diagnostic-*,clang-analyzer-*,-clang-analyzer-alpha*,google-*,-google-readability-todo,-google-runtime-references,-google-default-arguments,-clang-analyzer-core.uninitialized.UndefReturn,-clang-analyzer-core.UndefinedBinaryOperatorResult,-clang-analyzer-optin.cplusplus.VirtualCall,-clang-analyzer-cplusplus.NewDeleteLeaks,-google-readability-function-size'
 WarningsAsErrors: '*'
 HeaderFilterRegex: '.*'
 FormatStyle:     file
@@ -16,4 +16,4 @@
 # clang-analyzer-core.UndefinedBinaryOperatorResult - Generates errors in ACE, how do we ignore?
 
 # TEMP
-# clang-analyzer-optin.cplusplus.VirtualCall
\ No newline at end of file
+# clang-analyzer-optin.cplusplus.VirtualCall
diff --git a/cppcache/integration-test/ThinClientDistOps.hpp b/cppcache/integration-test/ThinClientDistOps.hpp
index fa73eb9..e640766 100644
--- a/cppcache/integration-test/ThinClientDistOps.hpp
+++ b/cppcache/integration-test/ThinClientDistOps.hpp
@@ -807,7 +807,7 @@
 
 void runDistOpsNotSticky() {
   CALL_TASK(CreateLocator1);
-  CALL_TASK(CreateServer1_With_Locator)
+  CALL_TASK(CreateServer1_With_Locator);
 
   CALL_TASK(CreateNonexistentServerRegion_Pooled_Locator);
   CALL_TASK(StepOne_Pooled_Locator);
@@ -831,7 +831,7 @@
 
 void runDistOpsSticky() {
   CALL_TASK(CreateLocator1);
-  CALL_TASK(CreateServer1_With_Locator)
+  CALL_TASK(CreateServer1_With_Locator);
 
   CALL_TASK(CreateNonexistentServerRegion_Pooled_Locator_Sticky);
   CALL_TASK(StepOne_Pooled_Locator_Sticky);
@@ -855,7 +855,7 @@
 
 void runDistOpsUpdateLocatorList() {
   CALL_TASK(CreateLocator1);
-  CALL_TASK(CreateServer1_With_Locator)
+  CALL_TASK(CreateServer1_With_Locator);
 
   CALL_TASK(CreatePoolForUpdateLocatorList);
 
@@ -868,7 +868,7 @@
 
 void runDistOpsDontUpdateLocatorList() {
   CALL_TASK(CreateLocator1);
-  CALL_TASK(CreateServer1_With_Locator)
+  CALL_TASK(CreateServer1_With_Locator);
 
   CALL_TASK(CreatePoolForDontUpdateLocatorList);
 
diff --git a/cppcache/integration-test/ThinClientFailover.hpp b/cppcache/integration-test/ThinClientFailover.hpp
index 6256e8e..044e644 100644
--- a/cppcache/integration-test/ThinClientFailover.hpp
+++ b/cppcache/integration-test/ThinClientFailover.hpp
@@ -402,7 +402,7 @@
 
 void runThinClientFailover(bool isSticky = false) {
   CALL_TASK(CreateLocator1);
-  CALL_TASK(CreateServer1_With_Locator)
+  CALL_TASK(CreateServer1_With_Locator);
 
   if (isSticky) {
     CALL_TASK(StepOne_Pooled_Locator_Sticky);
diff --git a/cppcache/integration-test/ThinClientFailover2.hpp b/cppcache/integration-test/ThinClientFailover2.hpp
index 3e84d1c..2e7d6ae 100644
--- a/cppcache/integration-test/ThinClientFailover2.hpp
+++ b/cppcache/integration-test/ThinClientFailover2.hpp
@@ -526,7 +526,7 @@
 
 void runThinClientFailover2() {
   CALL_TASK(CreateLocator1);
-  CALL_TASK(CreateServer1_With_Locator)
+  CALL_TASK(CreateServer1_With_Locator);
 
   CALL_TASK(StepOne_Pool_Locator);
   CALL_TASK(StepTwo_Pool_Locator);
diff --git a/cppcache/integration-test/ThinClientFailoverInterest.hpp b/cppcache/integration-test/ThinClientFailoverInterest.hpp
index 6503a65..7e13dad 100644
--- a/cppcache/integration-test/ThinClientFailoverInterest.hpp
+++ b/cppcache/integration-test/ThinClientFailoverInterest.hpp
@@ -410,7 +410,7 @@
 
 void runThinClientFailoverInterest() {
   CALL_TASK(CreateLocator1);
-  CALL_TASK(CreateServer1_With_Locator_XML)
+  CALL_TASK(CreateServer1_With_Locator_XML);
 
   CALL_TASK(StepOne_Pool_Locator);
   CALL_TASK(StepTwo_Pool_Locator);
diff --git a/cppcache/integration-test/ThinClientFailoverInterest2.hpp b/cppcache/integration-test/ThinClientFailoverInterest2.hpp
index 95d0049..8e44071 100644
--- a/cppcache/integration-test/ThinClientFailoverInterest2.hpp
+++ b/cppcache/integration-test/ThinClientFailoverInterest2.hpp
@@ -436,7 +436,7 @@
 
 void runThinClientFailoverInterest2() {
   CALL_TASK(CreateLocator1);
-  CALL_TASK(CreateServer1_With_Locator_XML)
+  CALL_TASK(CreateServer1_With_Locator_XML);
 
   CALL_TASK(StepOne_Pool_Locator);
   CALL_TASK(StepTwo_Pool_Locator);
diff --git a/cppcache/integration-test/ThinClientFailoverRegex.hpp b/cppcache/integration-test/ThinClientFailoverRegex.hpp
index 7930482..88cb005 100644
--- a/cppcache/integration-test/ThinClientFailoverRegex.hpp
+++ b/cppcache/integration-test/ThinClientFailoverRegex.hpp
@@ -481,7 +481,7 @@
 
 void runThinClientFailOverRegex() {
   CALL_TASK(CreateLocator1);
-  CALL_TASK(CreateServer1_With_Locator_XML)
+  CALL_TASK(CreateServer1_With_Locator_XML);
 
   CALL_TASK(StepOne_Pool_Locator);
   CALL_TASK(StepTwo_Pool_Locator);
diff --git a/cppcache/integration-test/ThinClientHeapLRU.hpp b/cppcache/integration-test/ThinClientHeapLRU.hpp
index b551d47..37532a0 100644
--- a/cppcache/integration-test/ThinClientHeapLRU.hpp
+++ b/cppcache/integration-test/ThinClientHeapLRU.hpp
@@ -232,7 +232,7 @@
 void runHeapLRU(bool poolConfig = true, bool isLocator = true) {
   if (poolConfig && isLocator) {
     CALL_TASK(CreateLocator1);
-    CALL_TASK(CreateServer1_With_Locator)
+    CALL_TASK(CreateServer1_With_Locator);
   } else {
     CALL_TASK(CreateServer1);
   }
diff --git a/cppcache/integration-test/ThinClientLocalCacheLoader.hpp b/cppcache/integration-test/ThinClientLocalCacheLoader.hpp
index 44a0c6b..9969ca5 100644
--- a/cppcache/integration-test/ThinClientLocalCacheLoader.hpp
+++ b/cppcache/integration-test/ThinClientLocalCacheLoader.hpp
@@ -260,7 +260,7 @@
   CALL_TASK(testInvalidateKey);
   CALL_TASK(testInvalidateRegion);
   CALL_TASK(CloseCache1);
-  CALL_TASK(StopServer)
+  CALL_TASK(StopServer);
 }
 
 }  // namespace
diff --git a/cppcache/integration-test/ThinClientSSL.hpp b/cppcache/integration-test/ThinClientSSL.hpp
index 03dc4db..de6bc85 100644
--- a/cppcache/integration-test/ThinClientSSL.hpp
+++ b/cppcache/integration-test/ThinClientSSL.hpp
@@ -485,7 +485,7 @@
 
 void doThinClientSSL() {
   CALL_TASK(CreateLocator1_With_SSL);
-  CALL_TASK(CreateServer1_With_Locator_And_SSL)
+  CALL_TASK(CreateServer1_With_Locator_And_SSL);
 
   CALL_TASK(CreateClient1);
   CALL_TASK(CreateClient2);
diff --git a/cppcache/integration-test/ThinClientSSLWithPassword.hpp b/cppcache/integration-test/ThinClientSSLWithPassword.hpp
index 2ea392b..4c0b177 100644
--- a/cppcache/integration-test/ThinClientSSLWithPassword.hpp
+++ b/cppcache/integration-test/ThinClientSSLWithPassword.hpp
@@ -499,7 +499,7 @@
 
 void doThinClientSSLWithPassword() {
   CALL_TASK(CreateLocator1_With_SSL);
-  CALL_TASK(CreateServer1_With_Locator_And_SSL)
+  CALL_TASK(CreateServer1_With_Locator_And_SSL);
 
   CALL_TASK(CreateClient1);
   CALL_TASK(CreateClient2);
diff --git a/cppcache/integration-test/ThinClientTXFailover.hpp b/cppcache/integration-test/ThinClientTXFailover.hpp
index babd047..52001a4 100644
--- a/cppcache/integration-test/ThinClientTXFailover.hpp
+++ b/cppcache/integration-test/ThinClientTXFailover.hpp
@@ -410,7 +410,7 @@
 
 void runThinClientFailover(bool isSticky = false) {
   CALL_TASK(CreateLocator1);
-  CALL_TASK(CreateServer1_With_Locator)
+  CALL_TASK(CreateServer1_With_Locator);
 
   if (isSticky) {
     CALL_TASK(StepOne_Pooled_Locator_Sticky);
diff --git a/cppcache/integration-test/ThinClientTransactionsXA.hpp b/cppcache/integration-test/ThinClientTransactionsXA.hpp
index 70b5c4b..24e9522 100644
--- a/cppcache/integration-test/ThinClientTransactionsXA.hpp
+++ b/cppcache/integration-test/ThinClientTransactionsXA.hpp
@@ -1103,7 +1103,7 @@
 
 void runTransactionOps(bool isSticky = false) {
   CALL_TASK(CreateLocator1);
-  CALL_TASK(CreateServer1_With_Locator)
+  CALL_TASK(CreateServer1_With_Locator);
 
   if (isSticky) {
     CALL_TASK(CreateNonexistentServerRegion_Pooled_Locator_Sticky);
diff --git a/cppcache/integration-test/fw_dunit.hpp b/cppcache/integration-test/fw_dunit.hpp
index 9378169..514c144 100644
--- a/cppcache/integration-test/fw_dunit.hpp
+++ b/cppcache/integration-test/fw_dunit.hpp
@@ -121,9 +121,11 @@
 #include <signal.h>
 
 #define ASSERT(x, y)                                   \
+  do {                                                 \
   if (!(x)) {                                          \
     throw dunit::TestException(y, __LINE__, __FILE__); \
-  }
+  }                                                    \
+  } while(false)
 #define XASSERT(x)                                      \
   if (!(x)) {                                           \
     throw dunit::TestException(#x, __LINE__, __FILE__); \
@@ -220,7 +222,7 @@
   }                                               \
   }                                               \
   ;
-#define CALL_TASK(y) DCLASSDEF(y) * DVARNAME(y) = new DCLASSDEF(y)();
+#define CALL_TASK(y); DCLASSDEF(y) * DVARNAME(y) = new DCLASSDEF(y)()
 
 #define DUNIT_MAIN         \
   class DCLASSNAME(Main) { \
diff --git a/cppcache/integration-test/testCacheless.cpp b/cppcache/integration-test/testCacheless.cpp
index 16d0f2e..aa52166 100644
--- a/cppcache/integration-test/testCacheless.cpp
+++ b/cppcache/integration-test/testCacheless.cpp
@@ -264,7 +264,7 @@
 DUNIT_MAIN
   {
     CALL_TASK(Setup);
-    CALL_TASK(CreateRegionNoCache)
+    CALL_TASK(CreateRegionNoCache);
 
     CALL_TASK(CreateNoCacheWListener);
     CALL_TASK(CreateRegionCacheMirror);
diff --git a/cppcache/integration-test/testCreateAndDestroyPool.cpp b/cppcache/integration-test/testCreateAndDestroyPool.cpp
index d35ce61..682ed96 100644
--- a/cppcache/integration-test/testCreateAndDestroyPool.cpp
+++ b/cppcache/integration-test/testCreateAndDestroyPool.cpp
@@ -65,6 +65,12 @@
 END_TASK_DEFINITION
 
 DUNIT_MAIN
-{CALL_TASK(CreateLocator1) CALL_TASK(CreateServer1_With_Locator)
-     CALL_TASK(StepOne) CALL_TASK(CloseCache1) CALL_TASK(CloseServer1)
-         CALL_TASK(CloseLocator1)} END_MAIN
+  {
+    CALL_TASK(CreateLocator1);
+    CALL_TASK(CreateServer1_With_Locator);
+    CALL_TASK(StepOne);
+    CALL_TASK(CloseCache1);
+    CALL_TASK(CloseServer1);
+    CALL_TASK(CloseLocator1);
+  }
+END_MAIN
diff --git a/cppcache/integration-test/testPdxMetadataCheckTest.cpp b/cppcache/integration-test/testPdxMetadataCheckTest.cpp
index e18268d..d11d1f2 100644
--- a/cppcache/integration-test/testPdxMetadataCheckTest.cpp
+++ b/cppcache/integration-test/testPdxMetadataCheckTest.cpp
@@ -416,17 +416,22 @@
 END_TASK_DEFINITION
 
 DUNIT_MAIN
-{CALL_TASK(StartLocator) CALL_TASK(CreateServerWithLocator_PdxMetadataTest)
-     CALL_TASK(StepOnePoolLoc_PdxMetadataTest)
-         CALL_TASK(StepTwoPoolLoc_PdxMetadataTest)
+  {
+    CALL_TASK(StartLocator);
+    CALL_TASK(CreateServerWithLocator_PdxMetadataTest);
+    CALL_TASK(StepOnePoolLoc_PdxMetadataTest);
+    CALL_TASK(StepTwoPoolLoc_PdxMetadataTest);
 
-             CALL_TASK(generateJavaPdxType)
+    CALL_TASK(generateJavaPdxType);
 
-                 CALL_TASK(putAllPdxTypes)
+    CALL_TASK(putAllPdxTypes);
 
-                     CALL_TASK(verifyDotNetPdxTypes)
+    CALL_TASK(verifyDotNetPdxTypes);
 
-                         CALL_TASK(CloseCache1) CALL_TASK(CloseCache2)
-                             CALL_TASK(CloseServer)
+    CALL_TASK(CloseCache1);
+    CALL_TASK(CloseCache2);
+    CALL_TASK(CloseServer);
 
-                                 CALL_TASK(CloseLocator)} END_MAIN
+    CALL_TASK(CloseLocator);
+  }
+END_MAIN
diff --git a/cppcache/integration-test/testThinClientCq.cpp b/cppcache/integration-test/testThinClientCq.cpp
index 9d34fad..258d847 100644
--- a/cppcache/integration-test/testThinClientCq.cpp
+++ b/cppcache/integration-test/testThinClientCq.cpp
@@ -1243,28 +1243,29 @@
   CALL_TASK(CloseLocator);
 }
 
-void setPortfolioPdxTypeC1() { CALL_TASK(SetPortfolioTypeToPdxC1) }
+void setPortfolioPdxTypeC1() { CALL_TASK(SetPortfolioTypeToPdxC1); }
 
-void UnsetPortfolioTypeC1() { CALL_TASK(UnsetPortfolioTypeToPdxC1) }
+void UnsetPortfolioTypeC1() { CALL_TASK(UnsetPortfolioTypeToPdxC1); }
 //
-void setPortfolioPdxTypeC2() { CALL_TASK(SetPortfolioTypeToPdxC2) }
+void setPortfolioPdxTypeC2() { CALL_TASK(SetPortfolioTypeToPdxC2); }
 
-void UnsetPortfolioTypeC2(){CALL_TASK(UnsetPortfolioTypeToPdxC2)}
+void UnsetPortfolioTypeC2() { CALL_TASK(UnsetPortfolioTypeToPdxC2); }
 
-DUNIT_MAIN {
-  UnsetPortfolioTypeC1();
-  UnsetPortfolioTypeC2();
-  for (int runIdx = 1; runIdx <= 2; ++runIdx) {
-    doThinClientCq();
+DUNIT_MAIN
+  {
+    UnsetPortfolioTypeC1();
+    UnsetPortfolioTypeC2();
+    for (int runIdx = 1; runIdx <= 2; ++runIdx) {
+      doThinClientCq();
 
-    setPortfolioPdxTypeC1();
-    setPortfolioPdxTypeC2();
+      setPortfolioPdxTypeC1();
+      setPortfolioPdxTypeC2();
+    }
+
+    { doThinClientCqStatus3(); }
+
+    { doThinClientCqStatus(); }
+
+    { doThinClientCqStatus2(); }
   }
-
-  { doThinClientCqStatus3(); }
-
-  { doThinClientCqStatus(); }
-
-  { doThinClientCqStatus2(); }
-}
 END_MAIN
diff --git a/cppcache/integration-test/testThinClientCqDelta.cpp b/cppcache/integration-test/testThinClientCqDelta.cpp
index 915a634..b5577cc 100644
--- a/cppcache/integration-test/testThinClientCqDelta.cpp
+++ b/cppcache/integration-test/testThinClientCqDelta.cpp
@@ -299,7 +299,7 @@
   {
     CALL_TASK(CreateLocator1);
 
-    CALL_TASK(CreateServer1_ForCqDelta)
+    CALL_TASK(CreateServer1_ForCqDelta);
 
     CALL_TASK(CreateClient1);
     CALL_TASK(CreateClient2);
diff --git a/cppcache/integration-test/testThinClientCqDurable.cpp b/cppcache/integration-test/testThinClientCqDurable.cpp
index c0c3819..66715ea 100644
--- a/cppcache/integration-test/testThinClientCqDurable.cpp
+++ b/cppcache/integration-test/testThinClientCqDurable.cpp
@@ -1014,9 +1014,9 @@
   CALL_TASK(CloseLocator);
 }
 
-void setPortfolioPdxType() { CALL_TASK(SetPortfolioTypeToPdx) }
+void setPortfolioPdxType() { CALL_TASK(SetPortfolioTypeToPdx); }
 
-void UnsetPortfolioType() { CALL_TASK(UnsetPortfolioTypeToPdx) }
+void UnsetPortfolioType() { CALL_TASK(UnsetPortfolioTypeToPdx); }
 
 void doThinClientCqDurable1() {
   CALL_TASK(CreateServer);
diff --git a/cppcache/integration-test/testThinClientDeltaWithNotification.cpp b/cppcache/integration-test/testThinClientDeltaWithNotification.cpp
index dd9c165..9059e22 100644
--- a/cppcache/integration-test/testThinClientDeltaWithNotification.cpp
+++ b/cppcache/integration-test/testThinClientDeltaWithNotification.cpp
@@ -376,7 +376,7 @@
 
 void doDeltaWithNotification() {
   CALL_TASK(CreateLocator1);
-  CALL_TASK(CreateServer1_ForDelta)
+  CALL_TASK(CreateServer1_ForDelta);
 
   CALL_TASK(CreateClient1);
   CALL_TASK(CreateClient2);
diff --git a/cppcache/integration-test/testThinClientDistOps2.cpp b/cppcache/integration-test/testThinClientDistOps2.cpp
index a4ada0a..c2663b4 100644
--- a/cppcache/integration-test/testThinClientDistOps2.cpp
+++ b/cppcache/integration-test/testThinClientDistOps2.cpp
@@ -20,8 +20,8 @@
 DUNIT_MAIN
   {
     CALL_TASK(CreateLocator1);
-    CALL_TASK(CreateServer1_With_Locator)
-    CALL_TASK(CreateServer2And3_Locator)
+    CALL_TASK(CreateServer1_With_Locator);
+    CALL_TASK(CreateServer2And3_Locator);
 
     CALL_TASK(CreateClient1Regions_Pooled_Locator);
     CALL_TASK(CreateClient2Regions_Pooled_Locator);
diff --git a/cppcache/integration-test/testThinClientFailover3.cpp b/cppcache/integration-test/testThinClientFailover3.cpp
index 58bf008..6960aef 100644
--- a/cppcache/integration-test/testThinClientFailover3.cpp
+++ b/cppcache/integration-test/testThinClientFailover3.cpp
@@ -19,7 +19,7 @@
 DUNIT_MAIN
   {
     CALL_TASK(CreateLocator1);
-    CALL_TASK(CreateServer1_With_Locator)
+    CALL_TASK(CreateServer1_With_Locator);
 
     CALL_TASK(SetupClient1PooledLocator);
     CALL_TASK(SetupClient2PooledLocator);
diff --git a/cppcache/integration-test/testThinClientHAMixedRedundancy.cpp b/cppcache/integration-test/testThinClientHAMixedRedundancy.cpp
index a93553e..4970573 100644
--- a/cppcache/integration-test/testThinClientHAMixedRedundancy.cpp
+++ b/cppcache/integration-test/testThinClientHAMixedRedundancy.cpp
@@ -544,7 +544,7 @@
 END_TASK_DEFINITION
 
 void runThinClientMixedRedundancy() {
-  CALL_TASK(CreateServers)
+  CALL_TASK(CreateServers);
   CALL_TASK(StepOne);
   CALL_TASK(StepTwo);
   CALL_TASK(StepThree);
diff --git a/cppcache/integration-test/testThinClientHAQueryFailover.cpp b/cppcache/integration-test/testThinClientHAQueryFailover.cpp
index 1bed282..25e46d6 100644
--- a/cppcache/integration-test/testThinClientHAQueryFailover.cpp
+++ b/cppcache/integration-test/testThinClientHAQueryFailover.cpp
@@ -297,7 +297,7 @@
   CALL_TASK(CreateLocator1);
   CALL_TASK(CreateServer1_With_Locator_OQL);
 
-  CALL_TASK(StepOne)
+  CALL_TASK(StepOne);
 
   CALL_TASK(CreateServer2_With_Locator_OQL);
 
diff --git a/cppcache/integration-test/testThinClientHeapLRU.cpp b/cppcache/integration-test/testThinClientHeapLRU.cpp
index 8a17c10..0572527 100644
--- a/cppcache/integration-test/testThinClientHeapLRU.cpp
+++ b/cppcache/integration-test/testThinClientHeapLRU.cpp
@@ -121,7 +121,7 @@
 
 DUNIT_MAIN
   {
-    CALL_TASK(CreateLocator1)
+    CALL_TASK(CreateLocator1);
     CALL_TASK(CreateServer1_With_Locator);
     CALL_TASK(StepOne);
     CALL_TASK(StepTwo);
diff --git a/cppcache/integration-test/testThinClientInterest1.cpp b/cppcache/integration-test/testThinClientInterest1.cpp
index dd04a31..e3dcaa6 100644
--- a/cppcache/integration-test/testThinClientInterest1.cpp
+++ b/cppcache/integration-test/testThinClientInterest1.cpp
@@ -20,7 +20,7 @@
 DUNIT_MAIN
   {
     CALL_TASK(CreateLocator1);
-    CALL_TASK(CreateServer1_With_Locator_XML)
+    CALL_TASK(CreateServer1_With_Locator_XML);
     CALL_TASK(SetupClient1_Pool_Locator);
     CALL_TASK(populateServer);
     CALL_TASK(setupClient2_Pool_Locator);
diff --git a/cppcache/integration-test/testThinClientInterest1_Bug1001.cpp b/cppcache/integration-test/testThinClientInterest1_Bug1001.cpp
index 95113d4..f0bb56d 100644
--- a/cppcache/integration-test/testThinClientInterest1_Bug1001.cpp
+++ b/cppcache/integration-test/testThinClientInterest1_Bug1001.cpp
@@ -283,7 +283,7 @@
 
 DUNIT_MAIN
   {
-    CALL_TASK(CreateLocator1)
+    CALL_TASK(CreateLocator1);
     CALL_TASK(CreateServer1_With_Locator);
     CALL_TASK(SetupClient1);
     CALL_TASK(populateServer);
diff --git a/cppcache/integration-test/testThinClientInterest2Pooled.cpp b/cppcache/integration-test/testThinClientInterest2Pooled.cpp
index 1359f14..32f22f6 100644
--- a/cppcache/integration-test/testThinClientInterest2Pooled.cpp
+++ b/cppcache/integration-test/testThinClientInterest2Pooled.cpp
@@ -20,7 +20,7 @@
 DUNIT_MAIN
   {
     CALL_TASK(CreateLocator1);
-    CALL_TASK(CreateServer1_With_Locator_XML)
+    CALL_TASK(CreateServer1_With_Locator_XML);
     CALL_TASK(SetupClient1_Pool_Locator);
     CALL_TASK(setupClient2_Pool_Locator);
     CALL_TASK(populateServer);
diff --git a/cppcache/integration-test/testThinClientInterest3.cpp b/cppcache/integration-test/testThinClientInterest3.cpp
index 4397c0a..cea429f 100644
--- a/cppcache/integration-test/testThinClientInterest3.cpp
+++ b/cppcache/integration-test/testThinClientInterest3.cpp
@@ -20,7 +20,7 @@
 DUNIT_MAIN
   {
     CALL_TASK(CreateLocator1);
-    CALL_TASK(CreateServer1_With_Locator_XML)
+    CALL_TASK(CreateServer1_With_Locator_XML);
     CALL_TASK(SetupClient1_Pool_Locator);
 
     CALL_TASK(testCreatesAndUpdates);
diff --git a/cppcache/integration-test/testThinClientInterest3Cacheless.cpp b/cppcache/integration-test/testThinClientInterest3Cacheless.cpp
index 5308366..d42f64f 100644
--- a/cppcache/integration-test/testThinClientInterest3Cacheless.cpp
+++ b/cppcache/integration-test/testThinClientInterest3Cacheless.cpp
@@ -20,7 +20,7 @@
 DUNIT_MAIN
   {
     CALL_TASK(CreateLocator1);
-    CALL_TASK(CreateServer1_With_Locator_XML)
+    CALL_TASK(CreateServer1_With_Locator_XML);
 
     CALL_TASK(SetupClient1_Pool_Locator);
 
diff --git a/cppcache/integration-test/testThinClientInterestList.cpp b/cppcache/integration-test/testThinClientInterestList.cpp
index 6510cbd..2670e5d 100644
--- a/cppcache/integration-test/testThinClientInterestList.cpp
+++ b/cppcache/integration-test/testThinClientInterestList.cpp
@@ -20,7 +20,7 @@
 DUNIT_MAIN
   {
     CALL_TASK(CreateLocator1);
-    CALL_TASK(CreateServer1_With_Locator_XML)
+    CALL_TASK(CreateServer1_With_Locator_XML);
 
     CALL_TASK(StepOne_Pool_Locator);
     CALL_TASK(StepTwo_Pool_Locator);
diff --git a/cppcache/integration-test/testThinClientInterestList2.cpp b/cppcache/integration-test/testThinClientInterestList2.cpp
index 3f29667..b90d59b 100644
--- a/cppcache/integration-test/testThinClientInterestList2.cpp
+++ b/cppcache/integration-test/testThinClientInterestList2.cpp
@@ -20,7 +20,7 @@
 DUNIT_MAIN
   {
     CALL_TASK(CreateLocator1);
-    CALL_TASK(CreateServer1_With_Locator_XML)
+    CALL_TASK(CreateServer1_With_Locator_XML);
     CALL_TASK(CreateClient1Regions);
     CALL_TASK(CreateClient2Regions);
 
diff --git a/cppcache/integration-test/testThinClientListenerCallbackArgTest.cpp b/cppcache/integration-test/testThinClientListenerCallbackArgTest.cpp
index 2c80567..5f294ce 100644
--- a/cppcache/integration-test/testThinClientListenerCallbackArgTest.cpp
+++ b/cppcache/integration-test/testThinClientListenerCallbackArgTest.cpp
@@ -349,7 +349,7 @@
 DUNIT_MAIN
   {
     CALL_TASK(CreateLocator1);
-    CALL_TASK(CreateServer1_With_Locator_XML5)
+    CALL_TASK(CreateServer1_With_Locator_XML5);
 
     CALL_TASK(SetupClient1_Pool_Locator);
     CALL_TASK(SetupClient2_Pool_Locator);
diff --git a/cppcache/integration-test/testThinClientListenerInit.cpp b/cppcache/integration-test/testThinClientListenerInit.cpp
index 4801496..8a262d5 100644
--- a/cppcache/integration-test/testThinClientListenerInit.cpp
+++ b/cppcache/integration-test/testThinClientListenerInit.cpp
@@ -20,14 +20,14 @@
 DUNIT_MAIN
   {
     CALL_TASK(CreateLocator1);
-    CALL_TASK(CreateServer1_With_Locator)
+    CALL_TASK(CreateServer1_With_Locator);
     CALL_TASK(SetupClient_Pooled_Locator);
     CALL_TASK(InitClientEvents);
     CALL_TASK(testLoaderAndWriter);
-    CALL_TASK(testCreatesAndUpdates)
+    CALL_TASK(testCreatesAndUpdates);
     CALL_TASK(testDestroy);
     CALL_TASK(CloseCache1);
-    CALL_TASK(StopServer)
+    CALL_TASK(StopServer);
     CALL_TASK(CloseLocator1);
   }
 END_MAIN
diff --git a/cppcache/integration-test/testThinClientNotificationWithDeltaWithoutcache.cpp b/cppcache/integration-test/testThinClientNotificationWithDeltaWithoutcache.cpp
index db5eacf..1eb1835 100644
--- a/cppcache/integration-test/testThinClientNotificationWithDeltaWithoutcache.cpp
+++ b/cppcache/integration-test/testThinClientNotificationWithDeltaWithoutcache.cpp
@@ -249,7 +249,7 @@
   {
     CALL_TASK(CreateLocator1);
 
-    CALL_TASK(CreateServer1_ForDelta)
+    CALL_TASK(CreateServer1_ForDelta);
 
     CALL_TASK(CreateClient1);
     CALL_TASK(CreateClient2);
diff --git a/cppcache/integration-test/testThinClientPdxDeltaWithNotification.cpp b/cppcache/integration-test/testThinClientPdxDeltaWithNotification.cpp
index 190d4fb..f0b9b46 100644
--- a/cppcache/integration-test/testThinClientPdxDeltaWithNotification.cpp
+++ b/cppcache/integration-test/testThinClientPdxDeltaWithNotification.cpp
@@ -379,7 +379,7 @@
 
 void doPdxDeltaWithNotification() {
   CALL_TASK(CreateLocator1);
-  CALL_TASK(CreateServer1_ForDelta)
+  CALL_TASK(CreateServer1_ForDelta);
 
   CALL_TASK(CreateClient1);
   CALL_TASK(CreateClient2);
diff --git a/cppcache/integration-test/testThinClientPdxInstance.cpp b/cppcache/integration-test/testThinClientPdxInstance.cpp
index 1c917db..f01e8fb 100644
--- a/cppcache/integration-test/testThinClientPdxInstance.cpp
+++ b/cppcache/integration-test/testThinClientPdxInstance.cpp
@@ -2591,7 +2591,7 @@
 
 void testPdxInstance() {
   CALL_TASK(CreateLocator1);
-  CALL_TASK(CreateServer1_With_Locator)
+  CALL_TASK(CreateServer1_With_Locator);
 
   CALL_TASK(StepOne_Pooled_Locator);
   CALL_TASK(StepTwo_Pooled_Locator);
@@ -2607,7 +2607,7 @@
 
 void testPdxInstanceWithPdxReadSerializedAndCaching() {
   CALL_TASK(CreateLocator1);
-  CALL_TASK(CreateServer1_With_Locator)
+  CALL_TASK(CreateServer1_With_Locator);
 
   CALL_TASK(StepOne_Pooled_Locator_PdxReadSerialized);
   CALL_TASK(StepTwo_Pooled_Locator_CachingEnabled_PdxReadSerialized);
@@ -2625,7 +2625,7 @@
 
 void testPdxInstanceWithPdxReadSerialized() {
   CALL_TASK(CreateLocator1);
-  CALL_TASK(CreateServer1_With_Locator)
+  CALL_TASK(CreateServer1_With_Locator);
 
   CALL_TASK(StepOne_Pooled_Locator_PdxReadSerialized);
   CALL_TASK(StepTwo_Pooled_Locator_PdxReadSerialized);
diff --git a/cppcache/integration-test/testThinClientPdxTests.cpp b/cppcache/integration-test/testThinClientPdxTests.cpp
index 0b05c7e..e240686 100644
--- a/cppcache/integration-test/testThinClientPdxTests.cpp
+++ b/cppcache/integration-test/testThinClientPdxTests.cpp
@@ -3976,494 +3976,495 @@
 ///
 
 void runPdxLongRunningClientTest() {
-  CALL_TASK(StartLocator)
-  CALL_TASK(CreateServerWithLocator)
-  CALL_TASK(StepOnePoolLocSysConfig)
-  CALL_TASK(StepTwoPoolLocSysConfig)
+  CALL_TASK(StartLocator);
+  CALL_TASK(CreateServerWithLocator);
+  CALL_TASK(StepOnePoolLocSysConfig);
+  CALL_TASK(StepTwoPoolLocSysConfig);
 
   // StepThree: Put some portfolio/Position objects
-  CALL_TASK(Puts2)
+  CALL_TASK(Puts2);
 
   // now close server
-  CALL_TASK(CloseServer)
+  CALL_TASK(CloseServer);
 
-  CALL_TASK(forCleanup)
+  CALL_TASK(forCleanup);
   // now start server
-  CALL_TASK(CreateServerWithLocator)
+  CALL_TASK(CreateServerWithLocator);
 
   // do put again
-  CALL_TASK(Puts22)
+  CALL_TASK(Puts22);
 
-  CALL_TASK(Get2)
+  CALL_TASK(Get2);
 
-  CALL_TASK(CloseCache1)
-  CALL_TASK(CloseCache2)
-  CALL_TASK(CloseServer)
+  CALL_TASK(CloseCache1);
+  CALL_TASK(CloseCache2);
+  CALL_TASK(CloseServer);
 
-  CALL_TASK(CloseLocator)
+  CALL_TASK(CloseLocator);
 }
 
 void runPdxDistOps() {
-  CALL_TASK(StartLocator)
-  CALL_TASK(CreateServerWithLocator)
-  CALL_TASK(StepOnePoolLoc)
-  CALL_TASK(StepTwoPoolLoc)
+  CALL_TASK(StartLocator);
+  CALL_TASK(CreateServerWithLocator);
+  CALL_TASK(StepOnePoolLoc);
+  CALL_TASK(StepTwoPoolLoc);
 
   // StepThree: Put some portfolio/Position objects
-  CALL_TASK(PutAndVerifyPdxInGet)
-  CALL_TASK(VerifyGetOnly)
-  CALL_TASK(PutAndVerifyVariousPdxTypes)
-  CALL_TASK(VerifyVariousPdxGets)
-  CALL_TASK(CloseCache1)
-  CALL_TASK(CloseCache2)
-  CALL_TASK(CloseServer)
+  CALL_TASK(PutAndVerifyPdxInGet);
+  CALL_TASK(VerifyGetOnly);
+  CALL_TASK(PutAndVerifyVariousPdxTypes);
+  CALL_TASK(VerifyVariousPdxGets);
+  CALL_TASK(CloseCache1);
+  CALL_TASK(CloseCache2);
+  CALL_TASK(CloseServer);
 
-  CALL_TASK(CloseLocator)
+  CALL_TASK(CloseLocator);
 }
 
 void runPdxTestForCharTypes() {
-  CALL_TASK(StartLocator)
-  CALL_TASK(CreateServerWithLocator)
-  CALL_TASK(StepOnePoolLoc)
-  CALL_TASK(StepTwoPoolLoc)
+  CALL_TASK(StartLocator);
+  CALL_TASK(CreateServerWithLocator);
+  CALL_TASK(StepOnePoolLoc);
+  CALL_TASK(StepTwoPoolLoc);
 
   // StepThree: Put some portfolio/Position objects
-  CALL_TASK(putCharTypes)
-  CALL_TASK(getCharTypes)
-  CALL_TASK(CloseCache1)
-  CALL_TASK(CloseCache2)
-  CALL_TASK(CloseServer)
+  CALL_TASK(putCharTypes);
+  CALL_TASK(getCharTypes);
+  CALL_TASK(CloseCache1);
+  CALL_TASK(CloseCache2);
+  CALL_TASK(CloseServer);
 
-  CALL_TASK(CloseLocator)
+  CALL_TASK(CloseLocator);
 }
 
 void testBug866() {
-  CALL_TASK(StartLocator)
-  CALL_TASK(CreateServerWithLocator)
-  CALL_TASK(StepOnePoolLocBug866)
-  CALL_TASK(StepTwoPoolLocBug866)
+  CALL_TASK(StartLocator);
+  CALL_TASK(CreateServerWithLocator);
+  CALL_TASK(StepOnePoolLocBug866);
+  CALL_TASK(StepTwoPoolLocBug866);
 
   // StepThree: Put some portfolio/Position objects
-  CALL_TASK(putOperation)
-  CALL_TASK(getOperation)
-  CALL_TASK(CloseCache1)
-  CALL_TASK(CloseCache2)
-  CALL_TASK(CloseServer)
+  CALL_TASK(putOperation);
+  CALL_TASK(getOperation);
+  CALL_TASK(CloseCache1);
+  CALL_TASK(CloseCache2);
+  CALL_TASK(CloseServer);
 
-  CALL_TASK(CloseLocator)
+  CALL_TASK(CloseLocator);
 }
 
 void runPdxPutGetTest() {
-  CALL_TASK(StartLocator)
-  CALL_TASK(CreateServerWithLocator)
-  CALL_TASK(StepOnePoolLoc)
-  CALL_TASK(StepTwoPoolLoc)
+  CALL_TASK(StartLocator);
+  CALL_TASK(CreateServerWithLocator);
+  CALL_TASK(StepOnePoolLoc);
+  CALL_TASK(StepTwoPoolLoc);
 
   // StepThree: Put some portfolio/Position objects
-  CALL_TASK(StepThree)
-  CALL_TASK(StepFour)
-  CALL_TASK(CloseCache1)
-  CALL_TASK(CloseCache2)
-  CALL_TASK(CloseServer)
+  CALL_TASK(StepThree);
+  CALL_TASK(StepFour);
+  CALL_TASK(CloseCache1);
+  CALL_TASK(CloseCache2);
+  CALL_TASK(CloseServer);
 
-  CALL_TASK(CloseLocator)
+  CALL_TASK(CloseLocator);
 }
 
 void runBasicMergeOpsR2() {
-  CALL_TASK(StartLocator)
-  CALL_TASK(CreateServerWithLocator1)
-  CALL_TASK(StepOnePoolLoc)
-  CALL_TASK(StepTwoPoolLoc)
+  CALL_TASK(StartLocator);
+  CALL_TASK(CreateServerWithLocator1);
+  CALL_TASK(StepOnePoolLoc);
+  CALL_TASK(StepTwoPoolLoc);
 
-  CALL_TASK(putAtVersionTwoR21)
+  CALL_TASK(putAtVersionTwoR21);
 
-  CALL_TASK(getPutAtVersionOneR22)
+  CALL_TASK(getPutAtVersionOneR22);
 
   for (int i = 0; i < 10; i++) {
     CALL_TASK(getPutAtVersionTwoR23);
     CALL_TASK(getPutAtVersionOneR24);
   }
 
-  CALL_TASK(CloseCache1)
-  CALL_TASK(CloseCache2)
-  CALL_TASK(CloseServer)
+  CALL_TASK(CloseCache1);
+  CALL_TASK(CloseCache2);
+  CALL_TASK(CloseServer);
 
-  CALL_TASK(CloseLocator)
+  CALL_TASK(CloseLocator);
 }
 
 void runBasicMergeOpsR1() {
-  CALL_TASK(StartLocator)
-  CALL_TASK(CreateServerWithLocator1)
-  CALL_TASK(StepOnePoolLoc)
-  CALL_TASK(StepTwoPoolLoc)
+  CALL_TASK(StartLocator);
+  CALL_TASK(CreateServerWithLocator1);
+  CALL_TASK(StepOnePoolLoc);
+  CALL_TASK(StepTwoPoolLoc);
 
-  CALL_TASK(putAtVersionTwo1)
+  CALL_TASK(putAtVersionTwo1);
 
-  CALL_TASK(getPutAtVersionOne2)
+  CALL_TASK(getPutAtVersionOne2);
 
-  CALL_TASK(getPutAtVersionTwo3)
+  CALL_TASK(getPutAtVersionTwo3);
 
-  CALL_TASK(getPutAtVersionOne4)
+  CALL_TASK(getPutAtVersionOne4);
 
   for (int i = 0; i < 10; i++) {
     CALL_TASK(getPutAtVersionTwo5);
     CALL_TASK(getPutAtVersionOne6);
   }
 
-  CALL_TASK(CloseCache1)
-  CALL_TASK(CloseCache2)
-  CALL_TASK(CloseServer)
+  CALL_TASK(CloseCache1);
+  CALL_TASK(CloseCache2);
+  CALL_TASK(CloseServer);
 
-  CALL_TASK(CloseLocator)
+  CALL_TASK(CloseLocator);
 }
 
 void runBasicMergeOps() {
-  CALL_TASK(StartLocator)
-  CALL_TASK(CreateServerWithLocator1)
-  CALL_TASK(StepOnePoolLoc)
-  CALL_TASK(StepTwoPoolLoc)
+  CALL_TASK(StartLocator);
+  CALL_TASK(CreateServerWithLocator1);
+  CALL_TASK(StepOnePoolLoc);
+  CALL_TASK(StepTwoPoolLoc);
 
-  CALL_TASK(putAtVersionOne11)
+  CALL_TASK(putAtVersionOne11);
 
-  CALL_TASK(getPutAtVersionTwo12)
+  CALL_TASK(getPutAtVersionTwo12);
 
-  CALL_TASK(getPutAtVersionOne13)
+  CALL_TASK(getPutAtVersionOne13);
 
-  CALL_TASK(getPutAtVersionTwo14)
+  CALL_TASK(getPutAtVersionTwo14);
 
   for (int i = 0; i < 10; i++) {
     CALL_TASK(getPutAtVersionOne15);
     CALL_TASK(getPutAtVersionTwo16);
   }
-  CALL_TASK(CloseCache1)
-  CALL_TASK(CloseCache2)
-  CALL_TASK(CloseServer)
+  CALL_TASK(CloseCache1);
+  CALL_TASK(CloseCache2);
+  CALL_TASK(CloseServer);
 
-  CALL_TASK(CloseLocator)
+  CALL_TASK(CloseLocator);
 }
 
 void runBasicMergeOps2() {
-  CALL_TASK(StartLocator)
-  CALL_TASK(CreateServerWithLocator1)
-  CALL_TASK(StepOnePoolLoc)
-  CALL_TASK(StepTwoPoolLoc)
+  CALL_TASK(StartLocator);
+  CALL_TASK(CreateServerWithLocator1);
+  CALL_TASK(StepOnePoolLoc);
+  CALL_TASK(StepTwoPoolLoc);
 
-  CALL_TASK(putAtVersionOne21)
+  CALL_TASK(putAtVersionOne21);
 
-  CALL_TASK(getPutAtVersionTwo22)
+  CALL_TASK(getPutAtVersionTwo22);
 
   for (int i = 0; i < 10; i++) {
     CALL_TASK(getPutAtVersionOne23);
     CALL_TASK(getPutAtVersionTwo24);
   }
-  CALL_TASK(CloseCache1)
-  CALL_TASK(CloseCache2)
-  CALL_TASK(CloseServer)
+  CALL_TASK(CloseCache1);
+  CALL_TASK(CloseCache2);
+  CALL_TASK(CloseServer);
 
-  CALL_TASK(CloseLocator)
+  CALL_TASK(CloseLocator);
 }
 
 void runBasicMergeOps3() {
-  CALL_TASK(StartLocator)
-  CALL_TASK(CreateServerWithLocator1)
-  CALL_TASK(StepOnePoolLoc)
-  CALL_TASK(StepTwoPoolLoc)
+  CALL_TASK(StartLocator);
+  CALL_TASK(CreateServerWithLocator1);
+  CALL_TASK(StepOnePoolLoc);
+  CALL_TASK(StepTwoPoolLoc);
 
-  CALL_TASK(putAtVersionOne31)
+  CALL_TASK(putAtVersionOne31);
 
-  CALL_TASK(getPutAtVersionTwo32)
+  CALL_TASK(getPutAtVersionTwo32);
 
   for (int i = 0; i < 10; i++) {
     CALL_TASK(getPutAtVersionOne33);
     CALL_TASK(getPutAtVersionTwo34);
   }
-  CALL_TASK(CloseCache1)
-  CALL_TASK(CloseCache2)
-  CALL_TASK(CloseServer)
+  CALL_TASK(CloseCache1);
+  CALL_TASK(CloseCache2);
+  CALL_TASK(CloseServer);
 
-  CALL_TASK(CloseLocator)
+  CALL_TASK(CloseLocator);
 }
 
 void runJavaInteroperableOps() {
-  CALL_TASK(StartLocator)
-  CALL_TASK(CreateServerWithLocator2)
-  CALL_TASK(StepOnePoolLoc)
-  CALL_TASK(StepTwoPoolLoc)
+  CALL_TASK(StartLocator);
+  CALL_TASK(CreateServerWithLocator2);
+  CALL_TASK(StepOnePoolLoc);
+  CALL_TASK(StepTwoPoolLoc);
 
-  CALL_TASK(JavaPutGet)  // c1
-  CALL_TASK(JavaGet)     // c2
+  CALL_TASK(JavaPutGet);  // c1
+  CALL_TASK(JavaGet);     // c2
 
-  CALL_TASK(CloseCache1)
-  CALL_TASK(CloseCache2)
-  CALL_TASK(CloseServer)
+  CALL_TASK(CloseCache1);
+  CALL_TASK(CloseCache2);
+  CALL_TASK(CloseServer);
 
-  CALL_TASK(CloseLocator)
+  CALL_TASK(CloseLocator);
 }
 
 // runJavaInterOpsUsingLinkedList
 void runJavaInterOpsUsingLinkedList() {
-  CALL_TASK(StartLocator)
-  CALL_TASK(CreateServerWithLocator2)
-  CALL_TASK(StepOnePoolLoc1)
-  CALL_TASK(StepTwoPoolLoc1)
+  CALL_TASK(StartLocator);
+  CALL_TASK(CreateServerWithLocator2);
+  CALL_TASK(StepOnePoolLoc1);
+  CALL_TASK(StepTwoPoolLoc1);
 
-  CALL_TASK(JavaPutGet1)  // c1
+  CALL_TASK(JavaPutGet1);  // c1
 
-  CALL_TASK(CloseCache1)
-  CALL_TASK(CloseCache2)
-  CALL_TASK(CloseServer)
+  CALL_TASK(CloseCache1);
+  CALL_TASK(CloseCache2);
+  CALL_TASK(CloseServer);
 
-  CALL_TASK(CloseLocator)
+  CALL_TASK(CloseLocator);
 }
 
 // test case that checks for Invalid Usage and corr. IllegalStatException for
 // PDXReader And PDXWriter APIs.
 void _disable_see_bug_999_testReaderWriterInvalidUsage() {
-  CALL_TASK(StartLocator)
-  CALL_TASK(CreateServerWithLocator2)
-  CALL_TASK(StepOnePoolLoc)
-  CALL_TASK(StepTwoPoolLoc)
+  CALL_TASK(StartLocator);
+  CALL_TASK(CreateServerWithLocator2);
+  CALL_TASK(StepOnePoolLoc);
+  CALL_TASK(StepTwoPoolLoc);
 
-  CALL_TASK(testPdxWriterAPIsWithInvalidArgs)
-  CALL_TASK(testPdxReaderAPIsWithInvalidArgs)
+  CALL_TASK(testPdxWriterAPIsWithInvalidArgs);
+  CALL_TASK(testPdxReaderAPIsWithInvalidArgs);
 
-  CALL_TASK(CloseCache1)
-  CALL_TASK(CloseCache2)
-  CALL_TASK(CloseServer)
+  CALL_TASK(CloseCache1);
+  CALL_TASK(CloseCache2);
+  CALL_TASK(CloseServer);
 
-  CALL_TASK(CloseLocator)
+  CALL_TASK(CloseLocator);
 }
 
 //
 void testPolymorphicUseCase() {
-  CALL_TASK(StartLocator)
-  CALL_TASK(CreateServerWithLocator2)
-  CALL_TASK(StepOnePoolLoc)
-  CALL_TASK(StepTwoPoolLoc)
+  CALL_TASK(StartLocator);
+  CALL_TASK(CreateServerWithLocator2);
+  CALL_TASK(StepOnePoolLoc);
+  CALL_TASK(StepTwoPoolLoc);
 
-  CALL_TASK(testPutWithMultilevelInheritance)
-  CALL_TASK(testGetWithMultilevelInheritance)
+  CALL_TASK(testPutWithMultilevelInheritance);
+  CALL_TASK(testGetWithMultilevelInheritance);
 
-  CALL_TASK(CloseCache1)
-  CALL_TASK(CloseCache2)
-  CALL_TASK(CloseServer)
+  CALL_TASK(CloseCache1);
+  CALL_TASK(CloseCache2);
+  CALL_TASK(CloseServer);
 
-  CALL_TASK(CloseLocator)
+  CALL_TASK(CloseLocator);
 }
 
 void runNestedPdxOps() {
-  CALL_TASK(StartLocator)
-  CALL_TASK(CreateServerWithLocator1)
-  CALL_TASK(StepOnePoolLoc)
-  CALL_TASK(StepTwoPoolLoc)
+  CALL_TASK(StartLocator);
+  CALL_TASK(CreateServerWithLocator1);
+  CALL_TASK(StepOnePoolLoc);
+  CALL_TASK(StepTwoPoolLoc);
 
-  CALL_TASK(PutAndVerifyNestedPdxInGet)
+  CALL_TASK(PutAndVerifyNestedPdxInGet);
 
-  CALL_TASK(VerifyNestedGetOnly)
+  CALL_TASK(VerifyNestedGetOnly);
 
-  CALL_TASK(CloseCache1)
-  CALL_TASK(CloseCache2)
-  CALL_TASK(CloseServer)
+  CALL_TASK(CloseCache1);
+  CALL_TASK(CloseCache2);
+  CALL_TASK(CloseServer);
 
-  CALL_TASK(CloseLocator)
+  CALL_TASK(CloseLocator);
 }
 
 void runNestedPdxOpsWithVersioning() {
-  CALL_TASK(StartLocator)
-  CALL_TASK(CreateServerWithLocator1)
-  CALL_TASK(StepOnePoolLoc)
-  CALL_TASK(StepTwoPoolLoc)
+  CALL_TASK(StartLocator);
+  CALL_TASK(CreateServerWithLocator1);
+  CALL_TASK(StepOnePoolLoc);
+  CALL_TASK(StepTwoPoolLoc);
 
-  CALL_TASK(PutMixedVersionNestedPdx)
+  CALL_TASK(PutMixedVersionNestedPdx);
 
-  CALL_TASK(VerifyMixedVersionNestedGetOnly)
+  CALL_TASK(VerifyMixedVersionNestedGetOnly);
 
-  CALL_TASK(CloseCache1)
-  CALL_TASK(CloseCache2)
-  CALL_TASK(CloseServer)
+  CALL_TASK(CloseCache1);
+  CALL_TASK(CloseCache2);
+  CALL_TASK(CloseServer);
 
-  CALL_TASK(CloseLocator)
+  CALL_TASK(CloseLocator);
 }
 
 void runPdxInGFSOps() {
-  CALL_TASK(StartLocator)
-  CALL_TASK(CreateServerWithLocator1)
-  CALL_TASK(StepOnePoolLoc)
-  CALL_TASK(StepTwoPoolLoc)
+  CALL_TASK(StartLocator);
+  CALL_TASK(CreateServerWithLocator1);
+  CALL_TASK(StepOnePoolLoc);
+  CALL_TASK(StepTwoPoolLoc);
 
-  CALL_TASK(PutAndVerifyPdxInGFSInGet)
+  CALL_TASK(PutAndVerifyPdxInGFSInGet);
 
-  CALL_TASK(VerifyPdxInGFSGetOnly)
+  CALL_TASK(VerifyPdxInGFSGetOnly);
 
-  CALL_TASK(CloseCache1)
-  CALL_TASK(CloseCache2)
-  CALL_TASK(CloseServer)
+  CALL_TASK(CloseCache1);
+  CALL_TASK(CloseCache2);
+  CALL_TASK(CloseServer);
 
-  CALL_TASK(CloseLocator)
+  CALL_TASK(CloseLocator);
 }
 
 void runPdxIgnoreUnreadFieldTest() {
-  CALL_TASK(StartLocator)
-  CALL_TASK(CreateServerWithLocator1)
-  CALL_TASK(StepOnePoolLoc_PDX)
-  CALL_TASK(StepTwoPoolLoc_PDX)
+  CALL_TASK(StartLocator);
+  CALL_TASK(CreateServerWithLocator1);
+  CALL_TASK(StepOnePoolLoc_PDX);
+  CALL_TASK(StepTwoPoolLoc_PDX);
 
-  CALL_TASK(putV2PdxUI)
+  CALL_TASK(putV2PdxUI);
 
-  CALL_TASK(putV1PdxUI)
+  CALL_TASK(putV1PdxUI);
 
-  CALL_TASK(getV2PdxUI)
+  CALL_TASK(getV2PdxUI);
 
-  CALL_TASK(CloseCache1)
-  CALL_TASK(CloseCache2)
-  CALL_TASK(CloseServer)
+  CALL_TASK(CloseCache1);
+  CALL_TASK(CloseCache2);
+  CALL_TASK(CloseServer);
 
-  CALL_TASK(CloseLocator)
+  CALL_TASK(CloseLocator);
 }
 
 // runPdxBankTest
 void runPdxBankTest() {
-  CALL_TASK(StartLocator)
-  CALL_TASK(CreateServerWithLocator_PdxMetadataTest)
-  CALL_TASK(StepOnePoolLoc_PdxMetadataTest)
-  CALL_TASK(StepTwoPoolLoc_PdxMetadataTest)
-  CALL_TASK(StepThreePoolLoc_PdxMetadataTest)
+  CALL_TASK(StartLocator);
+  CALL_TASK(CreateServerWithLocator_PdxMetadataTest);
+  CALL_TASK(StepOnePoolLoc_PdxMetadataTest);
+  CALL_TASK(StepTwoPoolLoc_PdxMetadataTest);
+  CALL_TASK(StepThreePoolLoc_PdxMetadataTest);
 
-  CALL_TASK(client1PutsV1Object)  // c1
+  CALL_TASK(client1PutsV1Object);  // c1
 
-  CALL_TASK(client2GetsV1ObjectAndPutsV2Object)  // c2
+  CALL_TASK(client2GetsV1ObjectAndPutsV2Object);  // c2
 
-  CALL_TASK(client3GetsV2Object)  // c3
+  CALL_TASK(client3GetsV2Object);  // c3
 
-  CALL_TASK(CloseCache1)
-  CALL_TASK(CloseCache2)
-  CALL_TASK(CloseCache3)  //
+  CALL_TASK(CloseCache1);
+  CALL_TASK(CloseCache2);
+  CALL_TASK(CloseCache3);  //
 
-  CALL_TASK(CloseServer)
+  CALL_TASK(CloseServer);
 
-  CALL_TASK(CloseLocator)
+  CALL_TASK(CloseLocator);
 }
 
-void enableWeakHashMapC1() { CALL_TASK(SetWeakHashMapToTrueC1) }
-void enableWeakHashMapC2() { CALL_TASK(SetWeakHashMapToTrueC2) }
+void enableWeakHashMapC1() { CALL_TASK(SetWeakHashMapToTrueC1); }
+void enableWeakHashMapC2() { CALL_TASK(SetWeakHashMapToTrueC2); }
 
-void disableWeakHashMapC1() { CALL_TASK(setWeakHashMapToFlaseC1) }
-void disableWeakHashMapC2() { CALL_TASK(SetWeakHashMapToFalseC2) }
+void disableWeakHashMapC1() { CALL_TASK(setWeakHashMapToFlaseC1); }
+void disableWeakHashMapC2() { CALL_TASK(SetWeakHashMapToFalseC2); }
 /////
-void enableWeakHashMapC1BM() { CALL_TASK(SetWeakHashMapToTrueC1BM) }
-void enableWeakHashMapC2BM() { CALL_TASK(SetWeakHashMapToTrueC2BM) }
+void enableWeakHashMapC1BM() { CALL_TASK(SetWeakHashMapToTrueC1BM); }
+void enableWeakHashMapC2BM() { CALL_TASK(SetWeakHashMapToTrueC2BM); }
 
-void disableWeakHashMapC1BM() { CALL_TASK(setWeakHashMapToFlaseC1BM) }
-void disableWeakHashMapC2BM() { CALL_TASK(SetWeakHashMapToFalseC2BM) }
+void disableWeakHashMapC1BM() { CALL_TASK(setWeakHashMapToFlaseC1BM); }
+void disableWeakHashMapC2BM() { CALL_TASK(SetWeakHashMapToFalseC2BM); }
 ////
-void enableWeakHashMapC1BM2() { CALL_TASK(SetWeakHashMapToTrueC1BM2) }
-void enableWeakHashMapC2BM2() { CALL_TASK(SetWeakHashMapToTrueC2BM2) }
+void enableWeakHashMapC1BM2() { CALL_TASK(SetWeakHashMapToTrueC1BM2); }
+void enableWeakHashMapC2BM2() { CALL_TASK(SetWeakHashMapToTrueC2BM2); }
 
-void disableWeakHashMapC1BM2() { CALL_TASK(setWeakHashMapToFlaseC1BM2) }
-void disableWeakHashMapC2BM2() { CALL_TASK(SetWeakHashMapToFalseC2BM2) }
+void disableWeakHashMapC1BM2() { CALL_TASK(setWeakHashMapToFlaseC1BM2); }
+void disableWeakHashMapC2BM2() { CALL_TASK(SetWeakHashMapToFalseC2BM2); }
 ////
-void enableWeakHashMapC1BM3() { CALL_TASK(SetWeakHashMapToTrueC1BM3) }
-void enableWeakHashMapC2BM3() { CALL_TASK(SetWeakHashMapToTrueC2BM3) }
+void enableWeakHashMapC1BM3() { CALL_TASK(SetWeakHashMapToTrueC1BM3); }
+void enableWeakHashMapC2BM3() { CALL_TASK(SetWeakHashMapToTrueC2BM3); }
 
-void disableWeakHashMapC1BM3() { CALL_TASK(setWeakHashMapToFlaseC1BM3) }
-void disableWeakHashMapC2BM3() { CALL_TASK(SetWeakHashMapToFalseC2BM3) }
+void disableWeakHashMapC1BM3() { CALL_TASK(setWeakHashMapToFlaseC1BM3); }
+void disableWeakHashMapC2BM3() { CALL_TASK(SetWeakHashMapToFalseC2BM3); }
 /////
-void enableWeakHashMapC1BMR1() { CALL_TASK(SetWeakHashMapToTrueC1BMR1) }
-void enableWeakHashMapC2BMR1() { CALL_TASK(SetWeakHashMapToTrueC2BMR1) }
+void enableWeakHashMapC1BMR1() { CALL_TASK(SetWeakHashMapToTrueC1BMR1); }
+void enableWeakHashMapC2BMR1() { CALL_TASK(SetWeakHashMapToTrueC2BMR1); }
 
-void disableWeakHashMapC1BMR1() { CALL_TASK(setWeakHashMapToFlaseC1BMR1) }
-void disableWeakHashMapC2BMR1() { CALL_TASK(SetWeakHashMapToFalseC2BMR1) }
+void disableWeakHashMapC1BMR1() { CALL_TASK(setWeakHashMapToFlaseC1BMR1); }
+void disableWeakHashMapC2BMR1() { CALL_TASK(SetWeakHashMapToFalseC2BMR1); }
 ///////
-void enableWeakHashMapC1BMR2() { CALL_TASK(SetWeakHashMapToTrueC1BMR2) }
-void enableWeakHashMapC2BMR2() { CALL_TASK(SetWeakHashMapToTrueC2BMR2) }
+void enableWeakHashMapC1BMR2() { CALL_TASK(SetWeakHashMapToTrueC1BMR2); }
+void enableWeakHashMapC2BMR2() { CALL_TASK(SetWeakHashMapToTrueC2BMR2); }
 
-void disableWeakHashMapC1BMR2() { CALL_TASK(setWeakHashMapToFlaseC1BMR2) }
-void disableWeakHashMapC2BMR2(){CALL_TASK(SetWeakHashMapToFalseC2BMR2)}
+void disableWeakHashMapC1BMR2() { CALL_TASK(setWeakHashMapToFlaseC1BMR2); }
+void disableWeakHashMapC2BMR2() { CALL_TASK(SetWeakHashMapToFalseC2BMR2); }
 
-DUNIT_MAIN {
-  { runPdxLongRunningClientTest(); }
-  // NON PDX UnitTest for Ticket#866 on NC OR SR#13306117704. Set client name
-  // via native client API
-  testBug866();
-
-  runPdxTestForCharTypes();
-
-  // PUT-GET Test with values of type CacheableObjectArray and PdxType object
-  runPdxPutGetTest();
-
-  // PdxDistOps-PdxTests::PdxType PUT/GET Test across clients
-  { runPdxDistOps(); }
-
-  // BasicMergeOps
+DUNIT_MAIN
   {
-    enableWeakHashMapC1BM();
-    enableWeakHashMapC2BM();
-    runBasicMergeOps();
+    { runPdxLongRunningClientTest(); }
+    // NON PDX UnitTest for Ticket#866 on NC OR SR#13306117704. Set client name
+    // via native client API
+    testBug866();
+
+    runPdxTestForCharTypes();
+
+    // PUT-GET Test with values of type CacheableObjectArray and PdxType object
+    runPdxPutGetTest();
+
+    // PdxDistOps-PdxTests::PdxType PUT/GET Test across clients
+    { runPdxDistOps(); }
+
+    // BasicMergeOps
+    {
+      enableWeakHashMapC1BM();
+      enableWeakHashMapC2BM();
+      runBasicMergeOps();
+    }
+
+    // BasicMergeOps2
+    {
+      enableWeakHashMapC1BM2();
+      enableWeakHashMapC2BM2();
+      runBasicMergeOps2();
+    }
+
+    // BasicMergeOps3
+    {
+      enableWeakHashMapC1BM3();
+      enableWeakHashMapC2BM3();
+      runBasicMergeOps3();
+    }
+
+    // BasicMergeOpsR1
+    {
+      enableWeakHashMapC1BMR1();
+      enableWeakHashMapC2BMR1();
+      runBasicMergeOpsR1();
+    }
+
+    // BasicMergeOpsR2
+    {
+      enableWeakHashMapC1BMR2();
+      enableWeakHashMapC2BMR2();
+      runBasicMergeOpsR2();
+    }
+
+    // JavaInteroperableOps
+    { runJavaInteroperableOps(); }
+
+    // PDXReaderWriterInvalidUsage
+    {
+        // disable see bug 999 for more details.
+        // testReaderWriterInvalidUsage();
+    }
+
+    // Test LinkedList
+    {
+      runJavaInterOpsUsingLinkedList();
+    }
+
+    // NestedPdxOps
+    { runNestedPdxOps(); }
+
+    // MixedVersionNestedPdxOps
+    { runNestedPdxOpsWithVersioning(); }
+
+    // Pdxobject In Geode Serializable Ops
+    //{
+    //  runPdxInGFSOps();
+    //}
+
+    {
+      enableWeakHashMapC1();
+      enableWeakHashMapC2();
+      runPdxIgnoreUnreadFieldTest();
+    }
+
+    // PdxBankTest
+    { runPdxBankTest(); }
+
+    // Polymorphic-multilevel inheritance
+    { testPolymorphicUseCase(); }
   }
-
-  // BasicMergeOps2
-  {
-    enableWeakHashMapC1BM2();
-    enableWeakHashMapC2BM2();
-    runBasicMergeOps2();
-  }
-
-  // BasicMergeOps3
-  {
-    enableWeakHashMapC1BM3();
-    enableWeakHashMapC2BM3();
-    runBasicMergeOps3();
-  }
-
-  // BasicMergeOpsR1
-  {
-    enableWeakHashMapC1BMR1();
-    enableWeakHashMapC2BMR1();
-    runBasicMergeOpsR1();
-  }
-
-  // BasicMergeOpsR2
-  {
-    enableWeakHashMapC1BMR2();
-    enableWeakHashMapC2BMR2();
-    runBasicMergeOpsR2();
-  }
-
-  // JavaInteroperableOps
-  { runJavaInteroperableOps(); }
-
-  // PDXReaderWriterInvalidUsage
-  {
-      // disable see bug 999 for more details.
-      // testReaderWriterInvalidUsage();
-  }
-
-  // Test LinkedList
-  {
-    runJavaInterOpsUsingLinkedList();
-  }
-
-  // NestedPdxOps
-  { runNestedPdxOps(); }
-
-  // MixedVersionNestedPdxOps
-  { runNestedPdxOpsWithVersioning(); }
-
-  // Pdxobject In Geode Serializable Ops
-  //{
-  //  runPdxInGFSOps();
-  //}
-
-  {
-    enableWeakHashMapC1();
-    enableWeakHashMapC2();
-    runPdxIgnoreUnreadFieldTest();
-  }
-
-  // PdxBankTest
-  { runPdxBankTest(); }
-
-  // Polymorphic-multilevel inheritance
-  { testPolymorphicUseCase(); }
-}
 END_MAIN
diff --git a/cppcache/integration-test/testThinClientPoolRedundancy.cpp b/cppcache/integration-test/testThinClientPoolRedundancy.cpp
index 2059ee3..a42504a 100644
--- a/cppcache/integration-test/testThinClientPoolRedundancy.cpp
+++ b/cppcache/integration-test/testThinClientPoolRedundancy.cpp
@@ -327,40 +327,40 @@
 DUNIT_MAIN
   {
     for (int runIndex = 0; runIndex < 2; ++runIndex) {
-      CALL_TASK(StartLocator)
-      CALL_TASK(StartServers)
+      CALL_TASK(StartLocator);
+      CALL_TASK(StartServers);
       if (runIndex == 0) {
-        CALL_TASK(CreateClient1_1)
-        CALL_TASK(CreateClient2_1)
+        CALL_TASK(CreateClient1_1);
+        CALL_TASK(CreateClient2_1);
       } else {
-        CALL_TASK(CreateClient1_2)
-        CALL_TASK(CreateClient2_2)
+        CALL_TASK(CreateClient1_2);
+        CALL_TASK(CreateClient2_2);
       }
-      CALL_TASK(VerifyK1C1)
+      CALL_TASK(VerifyK1C1);
 
       // Failover
 
       if (runIndex == 0) {
-        CALL_TASK(CloseServer1)
-        CALL_TASK(CloseServer2)
+        CALL_TASK(CloseServer1);
+        CALL_TASK(CloseServer2);
       }
 
-      CALL_TASK(FeedC1)
-      CALL_TASK(VerifyK0C2New)
+      CALL_TASK(FeedC1);
+      CALL_TASK(VerifyK0C2New);
       if (runIndex == 1) {
-        CALL_TASK(CloseServer1)
+        CALL_TASK(CloseServer1);
       }
-      CALL_TASK(FeedC2)
+      CALL_TASK(FeedC2);
 
       if (runIndex == 0) {
-        CALL_TASK(VerifyK1C1New)
+        CALL_TASK(VerifyK1C1New);
       } else {
-        CALL_TASK(VerifyK1C1New2)
+        CALL_TASK(VerifyK1C1New2);
       }
-      CALL_TASK(CloseCache1)
-      CALL_TASK(CloseCache2)
-      CALL_TASK(CloseServers)
-      CALL_TASK(CloseLocator)
+      CALL_TASK(CloseCache1);
+      CALL_TASK(CloseCache2);
+      CALL_TASK(CloseServers);
+      CALL_TASK(CloseLocator);
     }
   }
 END_MAIN
diff --git a/cppcache/integration-test/testThinClientPutAllTimeout.cpp b/cppcache/integration-test/testThinClientPutAllTimeout.cpp
index 1f180ab..0c95cad 100644
--- a/cppcache/integration-test/testThinClientPutAllTimeout.cpp
+++ b/cppcache/integration-test/testThinClientPutAllTimeout.cpp
@@ -20,7 +20,7 @@
 DUNIT_MAIN
   {
     CALL_TASK(CreateLocator1);
-    CALL_TASK(CreateServer1_With_Locator_XML2)
+    CALL_TASK(CreateServer1_With_Locator_XML2);
     CALL_TASK(SetupClient1_Pool_Locator);
 
     CALL_TASK(testTimeoutException);
diff --git a/cppcache/integration-test/testThinClientPutWithDelta.cpp b/cppcache/integration-test/testThinClientPutWithDelta.cpp
index a139c29..fee7eb7 100644
--- a/cppcache/integration-test/testThinClientPutWithDelta.cpp
+++ b/cppcache/integration-test/testThinClientPutWithDelta.cpp
@@ -217,7 +217,7 @@
 END_TASK_DEFINITION
 
 void doDeltaPut() {
-  CALL_TASK(CreateServer1_ForDelta)
+  CALL_TASK(CreateServer1_ForDelta);
 
   CALL_TASK(CreateClient1_UsePools);
 
@@ -226,7 +226,7 @@
   CALL_TASK(CloseCache1);
   CALL_TASK(CloseServer1);
 
-  CALL_TASK(CreateServer1_DisableDelta)
+  CALL_TASK(CreateServer1_DisableDelta);
 
   CALL_TASK(CreateClient1_UsePools);
 
diff --git a/cppcache/integration-test/testThinClientRegex.cpp b/cppcache/integration-test/testThinClientRegex.cpp
index 8041f00..ea6e8d5 100644
--- a/cppcache/integration-test/testThinClientRegex.cpp
+++ b/cppcache/integration-test/testThinClientRegex.cpp
@@ -20,7 +20,7 @@
 DUNIT_MAIN
   {
     CALL_TASK(CreateLocator1);
-    CALL_TASK(CreateServer1_With_Locator_XML)
+    CALL_TASK(CreateServer1_With_Locator_XML);
 
     CALL_TASK(CreateClient1Regions);
     CALL_TASK(CreateClient2Regions);
diff --git a/cppcache/integration-test/testThinClientRegex2.cpp b/cppcache/integration-test/testThinClientRegex2.cpp
index 2bdd21d..c803bd7 100644
--- a/cppcache/integration-test/testThinClientRegex2.cpp
+++ b/cppcache/integration-test/testThinClientRegex2.cpp
@@ -20,7 +20,7 @@
 DUNIT_MAIN
   {
     CALL_TASK(CreateLocator1);
-    CALL_TASK(CreateServer1_With_Locator_XML)
+    CALL_TASK(CreateServer1_With_Locator_XML);
 
     CALL_TASK(StepOne_Pool_Locator);
     CALL_TASK(StepTwo_Pool_Locator);
diff --git a/cppcache/integration-test/testThinClientRegex3.cpp b/cppcache/integration-test/testThinClientRegex3.cpp
index 44ddb71..26feaf1 100644
--- a/cppcache/integration-test/testThinClientRegex3.cpp
+++ b/cppcache/integration-test/testThinClientRegex3.cpp
@@ -20,7 +20,7 @@
 DUNIT_MAIN
   {
     CALL_TASK(CreateLocator1);
-    CALL_TASK(CreateServer1_With_Locator_XML)
+    CALL_TASK(CreateServer1_With_Locator_XML);
 
     CALL_TASK(CreateClient1Regions);
     CALL_TASK(CreateClient2Regions);
diff --git a/cppcache/integration-test/testThinClientRegionQueryExclusiveness.cpp b/cppcache/integration-test/testThinClientRegionQueryExclusiveness.cpp
index ff9d876..c28396d 100644
--- a/cppcache/integration-test/testThinClientRegionQueryExclusiveness.cpp
+++ b/cppcache/integration-test/testThinClientRegionQueryExclusiveness.cpp
@@ -169,6 +169,12 @@
 END_TASK_DEFINITION
 
 DUNIT_MAIN
-{CALL_TASK(StartLocator) CALL_TASK(CreateServerWithLocator)
-     CALL_TASK(ClientOpPoolLocator) CALL_TASK(CloseCache1)
-         CALL_TASK(CloseServer) CALL_TASK(CloseLocator)} END_MAIN
+  {
+    CALL_TASK(StartLocator);
+    CALL_TASK(CreateServerWithLocator);
+    CALL_TASK(ClientOpPoolLocator);
+    CALL_TASK(CloseCache1);
+    CALL_TASK(CloseServer);
+    CALL_TASK(CloseLocator);
+  }
+END_MAIN
diff --git a/cppcache/integration-test/testThinClientRemoteQueryFailoverPdx.cpp b/cppcache/integration-test/testThinClientRemoteQueryFailoverPdx.cpp
index e05cc70..eb486ac 100644
--- a/cppcache/integration-test/testThinClientRemoteQueryFailoverPdx.cpp
+++ b/cppcache/integration-test/testThinClientRemoteQueryFailoverPdx.cpp
@@ -244,7 +244,8 @@
   CALL_TASK(RegisterTypesAndCreatePoolAndRegion);
   CALL_TASK(CreateServer2WithLocator);
   CALL_TASK(ValidateQueryExecutionAcrossServerFailure);
-  CALL_TASK(CloseCache1) CALL_TASK(CloseServer2);
+  CALL_TASK(CloseCache1);
+  CALL_TASK(CloseServer2);
   CALL_TASK(CloseLocator);
 }
 
diff --git a/cppcache/integration-test/testThinClientRemoteQueryRS.cpp b/cppcache/integration-test/testThinClientRemoteQueryRS.cpp
index 4d615b0..f47033a 100644
--- a/cppcache/integration-test/testThinClientRemoteQueryRS.cpp
+++ b/cppcache/integration-test/testThinClientRemoteQueryRS.cpp
@@ -549,29 +549,30 @@
 END_TASK_DEFINITION
 
 void runRemoteQueryRSTest() {
-  CALL_TASK(StartLocator)
-  CALL_TASK(CreateServerWithLocator)
-  CALL_TASK(StepOnePoolLoc)
+  CALL_TASK(StartLocator);
+  CALL_TASK(CreateServerWithLocator);
+  CALL_TASK(StepOnePoolLoc);
 
-  CALL_TASK(StepThree)
-  CALL_TASK(StepFour)
-  CALL_TASK(StepFive)
-  CALL_TASK(StepSix)
-  CALL_TASK(DoQueryRSError)
-  CALL_TASK(CloseCache1)
-  CALL_TASK(CloseServer)
+  CALL_TASK(StepThree);
+  CALL_TASK(StepFour);
+  CALL_TASK(StepFive);
+  CALL_TASK(StepSix);
+  CALL_TASK(DoQueryRSError);
+  CALL_TASK(CloseCache1);
+  CALL_TASK(CloseServer);
 
-  CALL_TASK(CloseLocator)
+  CALL_TASK(CloseLocator);
 }
 
-void setPortfolioPdxType() { CALL_TASK(SetPortfolioTypeToPdx) }
+void setPortfolioPdxType() { CALL_TASK(SetPortfolioTypeToPdx); }
 
-void UnsetPortfolioType(){CALL_TASK(UnsetPortfolioTypeToPdx)}
+void UnsetPortfolioType() { CALL_TASK(UnsetPortfolioTypeToPdx); }
 
-DUNIT_MAIN {
-  for (int i = 0; i < 2; i++) {
-    runRemoteQueryRSTest();
-    setPortfolioPdxType();
+DUNIT_MAIN
+  {
+    for (int i = 0; i < 2; i++) {
+      runRemoteQueryRSTest();
+      setPortfolioPdxType();
+    }
   }
-}
 END_MAIN
diff --git a/cppcache/integration-test/testThinClientRemoteQuerySS.cpp b/cppcache/integration-test/testThinClientRemoteQuerySS.cpp
index 789647a..5e70e48 100644
--- a/cppcache/integration-test/testThinClientRemoteQuerySS.cpp
+++ b/cppcache/integration-test/testThinClientRemoteQuerySS.cpp
@@ -627,8 +627,18 @@
 END_TASK_DEFINITION
 
 DUNIT_MAIN
-{CALL_TASK(StartLocator) CALL_TASK(CreateServerWithLocator)
-     CALL_TASK(StepOnePoolLoc) CALL_TASK(StepThree) CALL_TASK(StepFour)
-         CALL_TASK(StepFive) CALL_TASK(StepSix) CALL_TASK(GetAll)
-             CALL_TASK(DoQuerySSError) CALL_TASK(CloseCache1)
-                 CALL_TASK(CloseServer1) CALL_TASK(CloseLocator)} END_MAIN
+  {
+    CALL_TASK(StartLocator);
+    CALL_TASK(CreateServerWithLocator);
+    CALL_TASK(StepOnePoolLoc);
+    CALL_TASK(StepThree);
+    CALL_TASK(StepFour);
+    CALL_TASK(StepFive);
+    CALL_TASK(StepSix);
+    CALL_TASK(GetAll);
+    CALL_TASK(DoQuerySSError);
+    CALL_TASK(CloseCache1);
+    CALL_TASK(CloseServer1);
+    CALL_TASK(CloseLocator);
+  }
+END_MAIN
diff --git a/cppcache/integration-test/testThinClientRemoteQueryTimeout.cpp b/cppcache/integration-test/testThinClientRemoteQueryTimeout.cpp
index 891e436..d1568ca 100644
--- a/cppcache/integration-test/testThinClientRemoteQueryTimeout.cpp
+++ b/cppcache/integration-test/testThinClientRemoteQueryTimeout.cpp
@@ -542,38 +542,39 @@
 END_TASK_DEFINITION
 
 void runRemoteQueryTimeoutTest() {
-  CALL_TASK(StartLocator)
-  CALL_TASK(CreateServerWithLocator)
-  CALL_TASK(StepOnePoolLoc)
+  CALL_TASK(StartLocator);
+  CALL_TASK(CreateServerWithLocator);
+  CALL_TASK(StepOnePoolLoc);
 
-  CALL_TASK(StepTwo)
-  CALL_TASK(StepThree)
-  CALL_TASK(StepFour)
-  CALL_TASK(StepFive)
-  CALL_TASK(StepSix)
-  CALL_TASK(StepSeven)
-  CALL_TASK(StepEight)
+  CALL_TASK(StepTwo);
+  CALL_TASK(StepThree);
+  CALL_TASK(StepFour);
+  CALL_TASK(StepFive);
+  CALL_TASK(StepSix);
+  CALL_TASK(StepSeven);
+  CALL_TASK(StepEight);
   CALL_TASK(verifyNegativeValueTimeout);
   CALL_TASK(verifyLargeValueTimeout);
-  CALL_TASK(CloseCache1)
-  CALL_TASK(CloseServer1)
+  CALL_TASK(CloseCache1);
+  CALL_TASK(CloseServer1);
 
-  CALL_TASK(CloseLocator)
+  CALL_TASK(CloseLocator);
 }
 
-void setPortfolioPdxType() { CALL_TASK(SetPortfolioTypeToPdx) }
+void setPortfolioPdxType() { CALL_TASK(SetPortfolioTypeToPdx); }
 
-void UnsetPortfolioType(){CALL_TASK(UnsetPortfolioTypeToPdx)}
+void UnsetPortfolioType() { CALL_TASK(UnsetPortfolioTypeToPdx); }
 
-DUNIT_MAIN {
-  // Basic Old Test
-  runRemoteQueryTimeoutTest();
-
-  UnsetPortfolioType();
-  for (int runIdx = 1; runIdx <= 2; ++runIdx) {
-    // New Test with Pool + EP
+DUNIT_MAIN
+  {
+    // Basic Old Test
     runRemoteQueryTimeoutTest();
-    setPortfolioPdxType();
+
+    UnsetPortfolioType();
+    for (int runIdx = 1; runIdx <= 2; ++runIdx) {
+      // New Test with Pool + EP
+      runRemoteQueryTimeoutTest();
+      setPortfolioPdxType();
+    }
   }
-}
 END_MAIN
diff --git a/cppcache/integration-test/testThinClientRemoteRegionQuery.cpp b/cppcache/integration-test/testThinClientRemoteRegionQuery.cpp
index 9b730dc..781ecb7 100644
--- a/cppcache/integration-test/testThinClientRemoteRegionQuery.cpp
+++ b/cppcache/integration-test/testThinClientRemoteRegionQuery.cpp
@@ -480,33 +480,34 @@
 END_TASK_DEFINITION
 
 void runRemoteRegionQueryTest() {
-  CALL_TASK(StartLocator)
-  CALL_TASK(CreateServerWithLocator)
-  CALL_TASK(StepOnePoolLocator)
+  CALL_TASK(StartLocator);
+  CALL_TASK(CreateServerWithLocator);
+  CALL_TASK(StepOnePoolLocator);
 
-  CALL_TASK(StepTwo)
-  CALL_TASK(StepThree)
-  CALL_TASK(StepFour)
-  CALL_TASK(StepFive)
-  CALL_TASK(QueryError)
-  CALL_TASK(CloseCache1)
-  CALL_TASK(CloseServer1)
+  CALL_TASK(StepTwo);
+  CALL_TASK(StepThree);
+  CALL_TASK(StepFour);
+  CALL_TASK(StepFive);
+  CALL_TASK(QueryError);
+  CALL_TASK(CloseCache1);
+  CALL_TASK(CloseServer1);
 
-  CALL_TASK(CloseLocator)
+  CALL_TASK(CloseLocator);
 }
 
-void setPortfolioPdxType() { CALL_TASK(SetPortfolioTypeToPdx) }
+void setPortfolioPdxType() { CALL_TASK(SetPortfolioTypeToPdx); }
 
-void UnsetPortfolioType(){CALL_TASK(UnsetPortfolioTypeToPdx)}
+void UnsetPortfolioType() { CALL_TASK(UnsetPortfolioTypeToPdx); }
 
-DUNIT_MAIN {
-  // Basic Old Test
-  // runRemoteRegionQueryTest();
+DUNIT_MAIN
+  {
+    // Basic Old Test
+    // runRemoteRegionQueryTest();
 
-  UnsetPortfolioType();
-  for (int runIdx = 1; runIdx <= 2; ++runIdx) {
-    runRemoteRegionQueryTest();
-    setPortfolioPdxType();
+    UnsetPortfolioType();
+    for (int runIdx = 1; runIdx <= 2; ++runIdx) {
+      runRemoteRegionQueryTest();
+      setPortfolioPdxType();
+    }
   }
-}
 END_MAIN
diff --git a/cppcache/integration-test/testThinClientRemoveOps.cpp b/cppcache/integration-test/testThinClientRemoveOps.cpp
index 455d28e..e4d781a 100644
--- a/cppcache/integration-test/testThinClientRemoveOps.cpp
+++ b/cppcache/integration-test/testThinClientRemoveOps.cpp
@@ -1699,7 +1699,7 @@
 
 void runRemoveOps() {
   CALL_TASK(CreateLocator1);
-  CALL_TASK(CreateServer1_With_Locator)
+  CALL_TASK(CreateServer1_With_Locator);
 
   CALL_TASK(StepOne_Pooled_Locator);
   CALL_TASK(StepTwo_Pooled_Locator);
diff --git a/cppcache/integration-test/testThinClientSSLAuthCorrupt.cpp b/cppcache/integration-test/testThinClientSSLAuthCorrupt.cpp
index d2b59b5..d0eeaf7 100644
--- a/cppcache/integration-test/testThinClientSSLAuthCorrupt.cpp
+++ b/cppcache/integration-test/testThinClientSSLAuthCorrupt.cpp
@@ -179,7 +179,7 @@
 DUNIT_MAIN
   {
     CALL_TASK(CreateLocator1_With_SSL_untrustedCert);
-    CALL_TASK(CreateServer1_With_Locator_And_SSL_untrustedCert)
+    CALL_TASK(CreateServer1_With_Locator_And_SSL_untrustedCert);
 
     CALL_TASK(CreateClient1);
 
diff --git a/cppcache/integration-test/testThinClientSSLAuthFail.cpp b/cppcache/integration-test/testThinClientSSLAuthFail.cpp
index 307a9d2..f0e456f 100644
--- a/cppcache/integration-test/testThinClientSSLAuthFail.cpp
+++ b/cppcache/integration-test/testThinClientSSLAuthFail.cpp
@@ -179,7 +179,7 @@
 DUNIT_MAIN
   {
     CALL_TASK(CreateLocator1_With_SSL_untrustedCert);
-    CALL_TASK(CreateServer1_With_Locator_And_SSL_untrustedCert)
+    CALL_TASK(CreateServer1_With_Locator_And_SSL_untrustedCert);
 
     CALL_TASK(CreateClient1);
 
diff --git a/cppcache/integration-test/testThinClientSSLAuthUntrusted.cpp b/cppcache/integration-test/testThinClientSSLAuthUntrusted.cpp
index 5fa241f..ce49ddc 100644
--- a/cppcache/integration-test/testThinClientSSLAuthUntrusted.cpp
+++ b/cppcache/integration-test/testThinClientSSLAuthUntrusted.cpp
@@ -180,7 +180,7 @@
 DUNIT_MAIN
   {
     CALL_TASK(CreateLocator1_With_SSL_untrustedCert);
-    CALL_TASK(CreateServer1_With_Locator_And_SSL_untrustedCert)
+    CALL_TASK(CreateServer1_With_Locator_And_SSL_untrustedCert);
 
     CALL_TASK(CreateClient1);
 
diff --git a/cppcache/integration-test/testThinClientTransactionsWithSticky.cpp b/cppcache/integration-test/testThinClientTransactionsWithSticky.cpp
index d27131d..7ab05b0 100644
--- a/cppcache/integration-test/testThinClientTransactionsWithSticky.cpp
+++ b/cppcache/integration-test/testThinClientTransactionsWithSticky.cpp
@@ -20,7 +20,7 @@
 DUNIT_MAIN
   {
     CALL_TASK(CreateLocator1);
-    CALL_TASK(CreateServer1_With_Locator)
+    CALL_TASK(CreateServer1_With_Locator);
 
     CALL_TASK(CreateNonexistentServerRegion_Pooled_Locator_Sticky);
     CALL_TASK(CreateClient1PooledRegionWithSticky);
diff --git a/cppcache/integration-test/testThinClientTransactionsWithoutSticky.cpp b/cppcache/integration-test/testThinClientTransactionsWithoutSticky.cpp
index e3d2351..b885fda 100644
--- a/cppcache/integration-test/testThinClientTransactionsWithoutSticky.cpp
+++ b/cppcache/integration-test/testThinClientTransactionsWithoutSticky.cpp
@@ -20,7 +20,7 @@
 DUNIT_MAIN
   {
     CALL_TASK(CreateLocator1);
-    CALL_TASK(CreateServer1_With_Locator)
+    CALL_TASK(CreateServer1_With_Locator);
 
     CALL_TASK(CreateNonexistentServerRegion_Pooled_Locator);
     CALL_TASK(CreateClient1PooledRegionWithoutSticky);
diff --git a/cppcache/integration/test/CMakeLists.txt b/cppcache/integration/test/CMakeLists.txt
index 21f1390..4df6c91 100644
--- a/cppcache/integration/test/CMakeLists.txt
+++ b/cppcache/integration/test/CMakeLists.txt
@@ -25,6 +25,7 @@
   ExpirationTest.cpp
   FunctionExecutionTest.cpp
   PdxInstanceTest.cpp
+  PdxSerializerTest.cpp
   RegionGetAllTest.cpp
   RegionPutAllTest.cpp
   RegionPutGetAllTest.cpp
diff --git a/cppcache/integration/test/PdxInstanceTest.cpp b/cppcache/integration/test/PdxInstanceTest.cpp
index b68a1a5..0ff8932 100644
--- a/cppcache/integration/test/PdxInstanceTest.cpp
+++ b/cppcache/integration/test/PdxInstanceTest.cpp
@@ -41,6 +41,7 @@
 
 using apache::geode::client::Cache;
 using apache::geode::client::CacheableKey;
+using apache::geode::client::CacheableString;
 using apache::geode::client::IllegalStateException;
 using apache::geode::client::LocalRegion;
 using apache::geode::client::PdxInstanceFactory;
@@ -54,6 +55,8 @@
 using testobject::ChildPdx;
 using testobject::ParentPdx;
 
+const std::string gemfireJsonClassName = "__GEMFIRE_JSON";
+
 std::shared_ptr<Region> setupRegion(Cache& cache) {
   auto region = cache.createRegionFactory(RegionShortcut::PROXY)
                     .setPoolName("default")
@@ -278,4 +281,27 @@
       << "ParentPdx objects should be equal.";
 }
 
+TEST(PdxInstanceTest, testCreateJsonInstance) {
+  Cluster cluster{LocatorCount{1}, ServerCount{1}};
+  cluster.getGfsh()
+      .create()
+      .region()
+      .withName("region")
+      .withType("REPLICATE")
+      .execute();
+
+  auto cache = cluster.createCache();
+  auto region = setupRegion(cache);
+  auto pdxInstanceFactory =
+      cache.createPdxInstanceFactory(gemfireJsonClassName);
+
+  pdxInstanceFactory.writeObject("foo",
+                                 CacheableString::create(std::string("bar")));
+  auto pdxInstance = pdxInstanceFactory.create();
+
+  region->put("simpleObject", pdxInstance);
+
+  auto retrievedValue = region->get("simpleObject");
+}
+
 }  // namespace
diff --git a/cppcache/integration/test/PdxSerializerTest.cpp b/cppcache/integration/test/PdxSerializerTest.cpp
new file mode 100644
index 0000000..fa74352
--- /dev/null
+++ b/cppcache/integration/test/PdxSerializerTest.cpp
@@ -0,0 +1,165 @@
+/*
+ * 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.
+ */
+
+#include <framework/Cluster.h>
+
+#include <initializer_list>
+#include <memory>
+
+#include <gtest/gtest.h>
+
+#include <geode/Cache.hpp>
+#include <geode/PdxWrapper.hpp>
+#include <geode/PoolManager.hpp>
+#include <geode/RegionFactory.hpp>
+#include <geode/RegionShortcut.hpp>
+#include <geode/TypeRegistry.hpp>
+
+namespace {
+
+using apache::geode::client::Cache;
+using apache::geode::client::Cacheable;
+using apache::geode::client::PdxReader;
+using apache::geode::client::PdxSerializable;
+using apache::geode::client::PdxSerializer;
+using apache::geode::client::PdxWrapper;
+using apache::geode::client::PdxWriter;
+using apache::geode::client::Region;
+using apache::geode::client::RegionShortcut;
+using apache::geode::client::UserObjectSizer;
+
+static const char* CLASSNAME1 = "PdxTests.PdxType";
+
+class TestPdxSerializer;
+
+class NonPdxType {
+ private:
+  int64_t longValue;
+
+ public:
+  NonPdxType() : longValue(1) {}
+
+  bool operator==(const NonPdxType& rhs) const {
+    return longValue == rhs.longValue;
+  }
+  //  bool operator!=(const NonPdxType& rhs) const { return !(rhs == *this); }
+
+  int64_t getLongValue() { return longValue; }
+  void setLongValue(int64_t value) { this->longValue = value; }
+
+  friend TestPdxSerializer;
+};
+
+class TestPdxSerializer : public PdxSerializer {
+ public:
+  static size_t objectSize(const std::shared_ptr<const void>&,
+                           const std::string& className) {
+    EXPECT_EQ(CLASSNAME1, className);
+    auto nonPdxType = std::make_shared<NonPdxType>();
+    return sizeof(nonPdxType->longValue);
+  }
+
+  UserObjectSizer getObjectSizer(const std::string& className) override {
+    EXPECT_EQ(CLASSNAME1, className);
+    return objectSize;
+  }
+
+  std::shared_ptr<void> fromData(const std::string& className,
+                                 PdxReader& pdxReader) override {
+    EXPECT_EQ(CLASSNAME1, className);
+    auto nonPdxType = std::make_shared<NonPdxType>();
+    try {
+      nonPdxType->longValue = pdxReader.readLong("longValue");
+    } catch (...) {
+      return nullptr;
+    }
+
+    return std::move(nonPdxType);
+  }
+
+  bool toData(const std::shared_ptr<const void>& testObject,
+              const std::string& className, PdxWriter& pdxWriter) override {
+    EXPECT_EQ(CLASSNAME1, className);
+
+    auto nonPdxType = std::static_pointer_cast<const NonPdxType>(testObject);
+
+    try {
+      pdxWriter.writeLong("longValue", nonPdxType->longValue);
+      pdxWriter.markIdentityField("longValue");
+    } catch (...) {
+      return false;
+    }
+    return true;
+  }
+};
+
+std::shared_ptr<Region> setupRegion(Cache& cache) {
+  auto region = cache.createRegionFactory(RegionShortcut::PROXY)
+                    .setPoolName("default")
+                    .create("region");
+
+  return region;
+}
+
+void assertNonPdxType(const std::shared_ptr<NonPdxType>& expected,
+                      const std::shared_ptr<Cacheable>& actual) {
+  ASSERT_NE(nullptr, actual);
+  auto pdxWrapper = std::dynamic_pointer_cast<PdxWrapper>(actual);
+  ASSERT_NE(nullptr, pdxWrapper);
+  auto object = pdxWrapper->getObject();
+  ASSERT_NE(nullptr, object);
+  auto nonPdxType = std::static_pointer_cast<NonPdxType>(object);
+  ASSERT_NE(nullptr, nonPdxType);
+  EXPECT_EQ(2, nonPdxType->getLongValue());
+
+  EXPECT_NE(expected, nonPdxType);
+  EXPECT_EQ(*expected, *nonPdxType);
+}
+
+TEST(PdxSerializerTest, canSerializeNonPdxSerializableType) {
+  Cluster cluster{LocatorCount{1}, ServerCount{1}};
+  cluster.getGfsh()
+      .create()
+      .region()
+      .withName("region")
+      .withType("REPLICATE")
+      .execute();
+
+  auto nonPdxType = std::make_shared<NonPdxType>();
+  nonPdxType->setLongValue(2);
+
+  {
+    auto cache = cluster.createCache();
+    auto region = setupRegion(cache);
+    cache.getTypeRegistry().registerPdxSerializer(
+        std::make_shared<TestPdxSerializer>());
+
+    region->put("2", std::make_shared<PdxWrapper>(nonPdxType, CLASSNAME1));
+    assertNonPdxType(nonPdxType, region->get("2"));
+  }
+
+  {
+    auto cache = cluster.createCache();
+    auto region = setupRegion(cache);
+    cache.getTypeRegistry().registerPdxSerializer(
+        std::make_shared<TestPdxSerializer>());
+
+    assertNonPdxType(nonPdxType, region->get("2"));
+  }
+}
+
+}  // namespace
diff --git a/cppcache/src/PdxHelper.cpp b/cppcache/src/PdxHelper.cpp
index a9ff28e..fd5efdf 100644
--- a/cppcache/src/PdxHelper.cpp
+++ b/cppcache/src/PdxHelper.cpp
@@ -19,6 +19,7 @@
 
 #include <geode/Cache.hpp>
 #include <geode/DataInput.hpp>
+#include <geode/PdxWrapper.hpp>
 #include <geode/PoolManager.hpp>
 
 #include "CacheRegionHelper.hpp"
@@ -146,12 +147,12 @@
   auto serializationRegistry = cacheImpl->getSerializationRegistry();
 
   auto pType = pdxTypeRegistry->getPdxType(typeId);
-  if (pType != nullptr) {  // this may happen with PdxInstanceFactory {
-    pdxLocalType = pdxTypeRegistry->getLocalPdxType(
-        pType->getPdxClassName());  // this should be fine for IPdxTypeMapper
+  if (pType) {
+    // this may happen with PdxInstanceFactory
+    pdxLocalType = pdxTypeRegistry->getLocalPdxType(pType->getPdxClassName());
   }
-  if (pType != nullptr && pdxLocalType != nullptr)  // type found
-  {
+  if (pType && pdxLocalType) {
+    // type found
     auto&& pdxClassname = pType->getPdxClassName();
     LOGDEBUG("deserializePdx ClassName = " + pdxClassname +
              ", isLocal = " + std::to_string(pType->isLocal()));
@@ -178,30 +179,30 @@
     }
   } else {
     // type not found; need to get from server
-    if (pType == nullptr) {
+    if (!pType) {
       pType = std::dynamic_pointer_cast<PdxType>(
           serializationRegistry->GetPDXTypeById(
               DataInputInternal::getPool(dataInput), typeId));
       pdxLocalType = pdxTypeRegistry->getLocalPdxType(pType->getPdxClassName());
     }
-    /* adongre  - Coverity II
-     * CID 29298: Unused pointer value (UNUSED_VALUE)
-     * Pointer "pdxClassname" returned by "pType->getPdxClassName()" is never
-     * used.
-     * Fix : Commented the line
-     */
-    // pdxClassname = pType->getPdxClassName();
     pdxObjectptr =
         serializationRegistry->getPdxSerializableType(pType->getPdxClassName());
-    auto pdxRealObject = pdxObjectptr;
-    if (pdxLocalType == nullptr)  // need to know local type
-    {
+    if (!pdxLocalType) {
+      // need to know local type
+      auto pdxRealObject = pdxObjectptr;
       auto prtc =
           PdxReaderWithTypeCollector(dataInput, pType, length, pdxTypeRegistry);
       pdxObjectptr->fromData(prtc);
+      if (auto pdxWrapper =
+              std::dynamic_pointer_cast<PdxWrapper>(pdxObjectptr)) {
+        if (!pdxWrapper->getObject()) {
+          // No serializer was registered to deserialize this type.
+          // Fall back to PdxInstance
+          return nullptr;
+        }
+      }
 
       // Check for the PdxWrapper
-
       pdxLocalType = prtc.getLocalType();
 
       if (pType->Equals(pdxLocalType)) {
@@ -259,52 +260,51 @@
   }
   return pdxObjectptr;
 }
+
 std::shared_ptr<PdxSerializable> PdxHelper::deserializePdx(
     DataInput& dataInput, bool forceDeserialize) {
   auto cacheImpl = CacheRegionHelper::getCacheImpl(dataInput.getCache());
   auto pdxTypeRegistry = cacheImpl->getPdxTypeRegistry();
   auto serializationRegistry = cacheImpl->getSerializationRegistry();
   auto& cachePerfStats = cacheImpl->getCachePerfStats();
-  if (pdxTypeRegistry->getPdxReadSerialized() == false || forceDeserialize) {
-    // Read Length
-    int32_t len = dataInput.readInt32();
 
-    int32_t typeId = dataInput.readInt32();
+  const auto len = dataInput.readInt32();
+  const auto typeId = dataInput.readInt32();
 
-    cachePerfStats.incPdxDeSerialization(len + 9);  // pdxLen + 1 + 2*4
-
-    return PdxHelper::deserializePdx(dataInput, typeId, len);
-
-  } else {
-    // Read Length
-    int32_t len = dataInput.readInt32();
-
-    int typeId = dataInput.readInt32();
-
-    auto pType = pdxTypeRegistry->getPdxType(typeId);
-
-    if (pType == nullptr) {
-      // TODO shared_ptr why redef?
-      auto pType = std::dynamic_pointer_cast<PdxType>(
-          serializationRegistry->GetPDXTypeById(
-              DataInputInternal::getPool(dataInput), typeId));
-      pdxTypeRegistry->addLocalPdxType(pType->getPdxClassName(), pType);
-      pdxTypeRegistry->addPdxType(pType->getTypeId(), pType);
+  if (!pdxTypeRegistry->getPdxReadSerialized() || forceDeserialize) {
+    const auto pos = dataInput.currentBufferPosition();
+    if (auto pdxObject = PdxHelper::deserializePdx(dataInput, typeId, len)) {
+      cachePerfStats.incPdxDeSerialization(len + 9);  // pdxLen + 1 + 2*4
+      return pdxObject;
     }
+    dataInput.rewindCursor(dataInput.currentBufferPosition() - pos);
+  }
 
-    cachePerfStats.incPdxInstanceCreations();
+  checkAndFetchPdxType(DataInputInternal::getPool(dataInput), pdxTypeRegistry,
+                       serializationRegistry, typeId);
 
-    // TODO::Enable it once the PdxInstanceImple is CheckedIn.
-    auto pdxObject = std::make_shared<PdxInstanceImpl>(
-        const_cast<uint8_t*>(dataInput.currentBufferPosition()), len, typeId,
-        cachePerfStats, *pdxTypeRegistry, *cacheImpl,
-        cacheImpl->getDistributedSystem()
-            .getSystemProperties()
-            .getEnableTimeStatistics());
+  cachePerfStats.incPdxInstanceCreations();
 
-    dataInput.advanceCursor(len);
+  auto pdxObject = std::make_shared<PdxInstanceImpl>(
+      const_cast<uint8_t*>(dataInput.currentBufferPosition()), len, typeId,
+      cachePerfStats, *pdxTypeRegistry, *cacheImpl,
+      cacheImpl->getDistributedSystem()
+          .getSystemProperties()
+          .getEnableTimeStatistics());
 
-    return std::move(pdxObject);
+  dataInput.advanceCursor(len);
+
+  return std::move(pdxObject);
+}
+void PdxHelper::checkAndFetchPdxType(
+    Pool* pool, std::shared_ptr<PdxTypeRegistry>& pdxTypeRegistry,
+    const std::shared_ptr<SerializationRegistry>& serializationRegistry,
+    int32_t typeId) {
+  if (!pdxTypeRegistry->getPdxType(typeId)) {
+    auto pType = std::dynamic_pointer_cast<PdxType>(
+        serializationRegistry->GetPDXTypeById(pool, typeId));
+    pdxTypeRegistry->addLocalPdxType(pType->getPdxClassName(), pType);
+    pdxTypeRegistry->addPdxType(pType->getTypeId(), pType);
   }
 }
 
diff --git a/cppcache/src/PdxHelper.hpp b/cppcache/src/PdxHelper.hpp
index eb6cd8e..8cd5aa2 100644
--- a/cppcache/src/PdxHelper.hpp
+++ b/cppcache/src/PdxHelper.hpp
@@ -36,6 +36,11 @@
                                std::shared_ptr<PdxType> remoteType,
                                DataInput& dataInput);
 
+  static void checkAndFetchPdxType(
+      Pool*, std::shared_ptr<PdxTypeRegistry>& pdxTypeRegistry,
+      const std::shared_ptr<SerializationRegistry>& serializationRegistry,
+      int32_t typeId);
+
  public:
   static uint8_t PdxHeader;
 
@@ -75,8 +80,6 @@
 
   static std::shared_ptr<EnumInfo> getEnum(
       int enumId, std::shared_ptr<PdxTypeRegistry> pdxTypeRegistry);
-
-  static CacheImpl* getCacheImpl();
 };
 }  // namespace client
 }  // namespace geode
diff --git a/cppcache/src/PdxWrapper.cpp b/cppcache/src/PdxWrapper.cpp
index 44e9f5f..bd69b06 100644
--- a/cppcache/src/PdxWrapper.cpp
+++ b/cppcache/src/PdxWrapper.cpp
@@ -57,7 +57,9 @@
 }
 
 void PdxWrapper::fromData(PdxReader& input) {
-  m_userObject = input.getPdxSerializer()->fromData(m_className, input);
+  if (auto pdxSerializer = input.getPdxSerializer()) {
+    m_userObject = pdxSerializer->fromData(m_className, input);
+  }
 }
 
 std::string PdxWrapper::toString() const {
diff --git a/cppcache/src/SerializationRegistry.cpp b/cppcache/src/SerializationRegistry.cpp
index b7d5e71..08f7b83 100644
--- a/cppcache/src/SerializationRegistry.cpp
+++ b/cppcache/src/SerializationRegistry.cpp
@@ -302,23 +302,14 @@
 
 std::shared_ptr<PdxSerializable> SerializationRegistry::getPdxSerializableType(
     const std::string& className) const {
-  TypeFactoryMethodPdx objectType = nullptr;
-  theTypeMap.findPdxSerializable(className, objectType);
   std::shared_ptr<PdxSerializable> pdxSerializable;
 
-  if (nullptr == objectType) {
-    try {
-      pdxSerializable = std::make_shared<PdxWrapper>(nullptr, className);
-    } catch (const Exception&) {
-      LOGERROR("Unregistered class " + className +
-               " during PDX deserialization: Did the application register the "
-               "PDX type or serializer?");
-      throw IllegalStateException(
-          "Unregistered class or serializer in PDX deserialization");
-    }
+  if (auto typeFactoryMethodPdx = theTypeMap.findPdxSerializable(className)) {
+    pdxSerializable = typeFactoryMethodPdx();
   } else {
-    pdxSerializable = objectType();
+    pdxSerializable = std::make_shared<PdxWrapper>(nullptr, className);
   }
+
   return pdxSerializable;
 }
 
@@ -512,14 +503,17 @@
   }
 }
 
-void TheTypeMap::findPdxSerializable(const std::string& objFullName,
-                                     TypeFactoryMethodPdx& func) const {
+TypeFactoryMethodPdx TheTypeMap::findPdxSerializable(
+    const std::string& objFullName) const {
   std::lock_guard<util::concurrent::spinlock_mutex> guard(
       m_pdxSerializableMapLock);
+
   const auto& found = m_pdxSerializableMap.find(objFullName);
   if (found != m_pdxSerializableMap.end()) {
-    func = found->second;
+    return found->second;
   }
+
+  return nullptr;
 }
 
 void TheTypeMap::rebindPdxSerializable(std::string objFullName,
diff --git a/cppcache/src/SerializationRegistry.hpp b/cppcache/src/SerializationRegistry.hpp
index bd46bcd..232e976 100644
--- a/cppcache/src/SerializationRegistry.hpp
+++ b/cppcache/src/SerializationRegistry.hpp
@@ -118,8 +118,8 @@
 
   void bindPdxSerializable(TypeFactoryMethodPdx func);
 
-  void findPdxSerializable(const std::string& objFullName,
-                           TypeFactoryMethodPdx& func) const;
+  TypeFactoryMethodPdx findPdxSerializable(
+      const std::string& objFullName) const;
 
   void unbindPdxSerializable(const std::string& objFullName);