You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by bb...@apache.org on 2021/08/30 17:17:47 UTC

[geode-native] branch support/1.14 updated: GEODE-9551: Fixes API return and parameter types. (#860)

This is an automated email from the ASF dual-hosted git repository.

bbender pushed a commit to branch support/1.14
in repository https://gitbox.apache.org/repos/asf/geode-native.git


The following commit(s) were added to refs/heads/support/1.14 by this push:
     new 74677ff  GEODE-9551: Fixes API return and parameter types. (#860)
74677ff is described below

commit 74677ff51cb6612f0bbe375a694683b8ee877bde
Author: Jacob Barrett <jb...@pivotal.io>
AuthorDate: Fri Aug 27 12:13:18 2021 -0700

    GEODE-9551: Fixes API return and parameter types. (#860)
---
 cppcache/include/geode/CacheableString.hpp        |  10 +-
 cppcache/include/geode/DataInput.hpp              |   2 +-
 cppcache/include/geode/Pool.hpp                   |   8 +-
 cppcache/include/geode/PoolFactory.hpp            |   2 +-
 cppcache/src/CacheTransactionManagerImpl.cpp      |   4 +-
 cppcache/src/ExceptionTypes.cpp                   | 107 ++++++++++------------
 cppcache/src/Pool.cpp                             |   7 +-
 cppcache/src/PoolAttributes.hpp                   |   8 +-
 cppcache/src/PoolFactory.cpp                      |   5 +-
 cppcache/src/RegionAttributes.cpp                 |  31 ++++---
 cppcache/src/TcrConnection.cpp                    |   6 +-
 cppcache/src/ThinClientPoolDM.hpp                 |   2 -
 cppcache/src/VersionedCacheableObjectPartList.cpp |   4 +-
 13 files changed, 99 insertions(+), 97 deletions(-)

diff --git a/cppcache/include/geode/CacheableString.hpp b/cppcache/include/geode/CacheableString.hpp
index e5973af..91a651c 100644
--- a/cppcache/include/geode/CacheableString.hpp
+++ b/cppcache/include/geode/CacheableString.hpp
@@ -54,11 +54,11 @@ class APACHE_GEODE_EXPORT CacheableString
       : m_str(std::move(value)), m_hashcode(0) {
     bool ascii = isAscii(m_str);
 
-    m_type =
-        m_str.length() > std::numeric_limits<uint16_t>::max()
-            ? ascii ? DSCode::CacheableASCIIStringHuge
-                    : DSCode::CacheableStringHuge
-            : ascii ? DSCode::CacheableASCIIString : DSCode::CacheableString;
+    m_type = m_str.length() > std::numeric_limits<uint16_t>::max()
+                 ? ascii ? DSCode::CacheableASCIIStringHuge
+                         : DSCode::CacheableStringHuge
+             : ascii ? DSCode::CacheableASCIIString
+                     : DSCode::CacheableString;
   }
 
   ~CacheableString() noexcept override = default;
diff --git a/cppcache/include/geode/DataInput.hpp b/cppcache/include/geode/DataInput.hpp
index 262bf58..23a771a 100644
--- a/cppcache/include/geode/DataInput.hpp
+++ b/cppcache/include/geode/DataInput.hpp
@@ -381,7 +381,7 @@ class APACHE_GEODE_EXPORT DataInput {
     } else {
       int8_t** tmpArray;
       int32_t* tmpLengtharr;
-      _GEODE_NEW(tmpArray, int8_t * [arrLen]);
+      _GEODE_NEW(tmpArray, int8_t* [arrLen]);
       _GEODE_NEW(tmpLengtharr, int32_t[arrLen]);
       for (int i = 0; i < arrLen; i++) {
         readBytes(&tmpArray[i], &tmpLengtharr[i]);
diff --git a/cppcache/include/geode/Pool.hpp b/cppcache/include/geode/Pool.hpp
index 5c82c29..f4abcd5 100644
--- a/cppcache/include/geode/Pool.hpp
+++ b/cppcache/include/geode/Pool.hpp
@@ -31,10 +31,6 @@
 #include "internal/geode_base.hpp"
 #include "internal/geode_globals.hpp"
 
-/**
- * @file
- */
-
 namespace apache {
 namespace geode {
 namespace client {
@@ -98,13 +94,13 @@ class APACHE_GEODE_EXPORT Pool : public std::enable_shared_from_this<Pool> {
    * Gets the host name of the SniProxy.
    * @see PoolFactory#setSniProxy(string, int)
    */
-  std::string getSniProxyHost() const;
+  const std::string& getSniProxyHost() const;
 
   /**
    * Gets the port of the SniProxy.
    * @see PoolFactory#setSniProxy(string, int)
    */
-  int getSniProxyPort() const;
+  uint16_t getSniProxyPort() const;
 
   /**
    * Gets the minimum connections for this pool.
diff --git a/cppcache/include/geode/PoolFactory.hpp b/cppcache/include/geode/PoolFactory.hpp
index d554482..7dc52b2 100644
--- a/cppcache/include/geode/PoolFactory.hpp
+++ b/cppcache/include/geode/PoolFactory.hpp
@@ -429,7 +429,7 @@ class APACHE_GEODE_EXPORT PoolFactory {
   /**
    * Set proxy info for SNI connection.  Used for connecting via SNI proxy.
    */
-  PoolFactory& setSniProxy(const std::string& hostname, const int port);
+  PoolFactory& setSniProxy(std::string hostname, uint16_t port);
 
   /**
    * If set to <code>true</code> then the created pool will have
diff --git a/cppcache/src/CacheTransactionManagerImpl.cpp b/cppcache/src/CacheTransactionManagerImpl.cpp
index 0467cea..9baf25d 100644
--- a/cppcache/src/CacheTransactionManagerImpl.cpp
+++ b/cppcache/src/CacheTransactionManagerImpl.cpp
@@ -160,7 +160,9 @@ GfErrType CacheTransactionManagerImpl::rollback(TXState*, bool) {
       case TcrMessage::EXCEPTION: {
         break;
       }
-      default: { break; }
+      default: {
+        break;
+      }
     }
   }
 
diff --git a/cppcache/src/ExceptionTypes.cpp b/cppcache/src/ExceptionTypes.cpp
index 213e2f5..252a0ee 100644
--- a/cppcache/src/ExceptionTypes.cpp
+++ b/cppcache/src/ExceptionTypes.cpp
@@ -73,8 +73,8 @@ using apache::geode::client::UnknownException;
   throw NotConnectedException{message};
 }
 
-    [[noreturn]] void messageException(std::string message, std::string& exMsg,
-                                       GfErrType, std::string) {
+[[noreturn]] void messageException(std::string message, std::string& exMsg,
+                                   GfErrType, std::string) {
   message.append(!exMsg.empty() ? exMsg
                                 : ": message from server could not be handled");
   throw MessageException{message};
@@ -93,8 +93,8 @@ using apache::geode::client::UnknownException;
   throw CacheServerException{message};
 }
 
-    [[noreturn]] void notOwnerException(std::string message, std::string& exMsg,
-                                        GfErrType, std::string) {
+[[noreturn]] void notOwnerException(std::string message, std::string& exMsg,
+                                    GfErrType, std::string) {
   message.append(!exMsg.empty() ? exMsg : ": not own the lock");
   throw NotOwnerException{message};
 }
@@ -110,9 +110,9 @@ using apache::geode::client::UnknownException;
   throw IllegalStateException{message};
 }
 
-    [[noreturn]] void illegalArgumentException(std::string message,
-                                               std::string& exMsg,
-                                               GfErrType err, std::string) {
+[[noreturn]] void illegalArgumentException(std::string message,
+                                           std::string& exMsg, GfErrType err,
+                                           std::string) {
   if (err == GF_CACHE_ILLEGAL_ARGUMENT_EXCEPTION) {
     message.append(!exMsg.empty() ? exMsg : ": illegal argument");
   }
@@ -140,9 +140,8 @@ using apache::geode::client::UnknownException;
   throw CacheWriterException{message};
 }
 
-    [[noreturn]] void cacheLoaderException(std::string message,
-                                           std::string& exMsg, GfErrType,
-                                           std::string) {
+[[noreturn]] void cacheLoaderException(std::string message, std::string& exMsg,
+                                       GfErrType, std::string) {
   message.append(!exMsg.empty() ? exMsg : ": exception in CacheLoader");
   throw CacheLoaderException{message};
 }
@@ -154,9 +153,9 @@ using apache::geode::client::UnknownException;
   throw CacheListenerException{message};
 }
 
-    [[noreturn]] void regionDestroyedException(std::string message,
-                                               std::string& exMsg,
-                                               GfErrType err, std::string) {
+[[noreturn]] void regionDestroyedException(std::string message,
+                                           std::string& exMsg, GfErrType err,
+                                           std::string) {
   if (err == GF_CACHE_REGION_INVALID) {
     message.append(!exMsg.empty() ? exMsg : ": region not valid");
   }
@@ -172,8 +171,8 @@ using apache::geode::client::UnknownException;
   throw CacheProxyException{message};
 }
 
-    [[noreturn]] void geodeIOException(std::string message, std::string& exMsg,
-                                       GfErrType, std::string) {
+[[noreturn]] void geodeIOException(std::string message, std::string& exMsg,
+                                   GfErrType, std::string) {
   message.append(!exMsg.empty() ? exMsg : ": Input/Output error in operation");
   throw GeodeIOException{message};
 }
@@ -184,8 +183,8 @@ using apache::geode::client::UnknownException;
   throw NoSystemException{message};
 }
 
-    [[noreturn]] void timeoutException(std::string message, std::string& exMsg,
-                                       GfErrType err, std::string) {
+[[noreturn]] void timeoutException(std::string message, std::string& exMsg,
+                                   GfErrType err, std::string) {
   if (err == GF_CLIENT_WAIT_TIMEOUT) {
     message.append(!exMsg.empty()
                        ? exMsg
@@ -202,9 +201,9 @@ using apache::geode::client::UnknownException;
   throw OutOfMemoryException{message};
 }
 
-    [[noreturn]] void bufferSizeExceededException(std::string message,
-                                                  std::string& exMsg, GfErrType,
-                                                  std::string) {
+[[noreturn]] void bufferSizeExceededException(std::string message,
+                                              std::string& exMsg, GfErrType,
+                                              std::string) {
   message.append(!exMsg.empty() ? exMsg : ": Buffer Size Exceeded");
   throw BufferSizeExceededException{message};
 }
@@ -215,9 +214,8 @@ using apache::geode::client::UnknownException;
   throw LeaseExpiredException{message};
 }
 
-    [[noreturn]] void regionExistsException(std::string message,
-                                            std::string& exMsg, GfErrType,
-                                            std::string) {
+[[noreturn]] void regionExistsException(std::string message, std::string& exMsg,
+                                        GfErrType, std::string) {
   message.append(!exMsg.empty() ? exMsg : ": Named Region Exists");
   throw RegionExistsException{message};
 }
@@ -229,9 +227,8 @@ using apache::geode::client::UnknownException;
   throw EntryNotFoundException{message};
 }
 
-    [[noreturn]] void entryExistsException(std::string message,
-                                           std::string& exMsg, GfErrType,
-                                           std::string) {
+[[noreturn]] void entryExistsException(std::string message, std::string& exMsg,
+                                       GfErrType, std::string) {
   message.append(!exMsg.empty() ? exMsg
                                 : ": Entry already exists in the region");
   throw EntryExistsException{message};
@@ -244,9 +241,8 @@ using apache::geode::client::UnknownException;
   throw EntryDestroyedException{message};
 }
 
-    [[noreturn]] void cacheClosedException(std::string message,
-                                           std::string& exMsg, GfErrType,
-                                           std::string) {
+[[noreturn]] void cacheClosedException(std::string message, std::string& exMsg,
+                                       GfErrType, std::string) {
   message.append(!exMsg.empty() ? exMsg : ": Cache has been closed");
   throw CacheClosedException{message};
 }
@@ -260,9 +256,9 @@ using apache::geode::client::UnknownException;
   throw StatisticsDisabledException{message};
 }
 
-    [[noreturn]] void concurrentModificationException(std::string message,
-                                                      std::string& exMsg,
-                                                      GfErrType, std::string) {
+[[noreturn]] void concurrentModificationException(std::string message,
+                                                  std::string& exMsg, GfErrType,
+                                                  std::string) {
   message.append(!exMsg.empty() ? exMsg
                                 : ": Concurrent modification in the cache");
   throw ConcurrentModificationException{message};
@@ -275,9 +271,9 @@ using apache::geode::client::UnknownException;
   throw NotAuthorizedException{message};
 }
 
-    [[noreturn]] void authenticationFailedException(std::string message,
-                                                    std::string& exMsg,
-                                                    GfErrType, std::string) {
+[[noreturn]] void authenticationFailedException(std::string message,
+                                                std::string& exMsg, GfErrType,
+                                                std::string) {
   message.append(!exMsg.empty() ? exMsg : ": authentication failed");
   throw AuthenticationFailedException{message};
 }
@@ -289,9 +285,9 @@ using apache::geode::client::UnknownException;
   throw AuthenticationRequiredException{message};
 }
 
-    [[noreturn]] void duplicateDurableClientException(std::string message,
-                                                      std::string& exMsg,
-                                                      GfErrType, std::string) {
+[[noreturn]] void duplicateDurableClientException(std::string message,
+                                                  std::string& exMsg, GfErrType,
+                                                  std::string) {
   message.append(!exMsg.empty() ? exMsg : ": Duplicate Durable Client Id");
   throw DuplicateDurableClientException{message};
 }
@@ -302,10 +298,8 @@ using apache::geode::client::UnknownException;
   throw QueryException{message};
 }
 
-    [[noreturn]] void noAvailableLocatorsException(std::string,
-                                                   std::string& exMsg,
-                                                   GfErrType,
-                                                   std::string func) {
+[[noreturn]] void noAvailableLocatorsException(std::string, std::string& exMsg,
+                                               GfErrType, std::string func) {
   try {
     throw NoAvailableLocatorsException{
         func + (!exMsg.empty() ? exMsg : ": No locators available")};
@@ -322,9 +316,9 @@ using apache::geode::client::UnknownException;
   throw AllConnectionsInUseException{message};
 }
 
-    [[noreturn]] void functionExecutionException(std::string message,
-                                                 std::string& exMsg, GfErrType,
-                                                 std::string) {
+[[noreturn]] void functionExecutionException(std::string message,
+                                             std::string& exMsg, GfErrType,
+                                             std::string) {
   message.append(!exMsg.empty() ? exMsg : ": Function execution failed");
   throw FunctionExecutionException{message};
 }
@@ -335,8 +329,8 @@ using apache::geode::client::UnknownException;
   throw DiskFailureException{message};
 }
 
-    [[noreturn]] void rollbackException(std::string message, std::string& exMsg,
-                                        GfErrType, std::string) {
+[[noreturn]] void rollbackException(std::string message, std::string& exMsg,
+                                    GfErrType, std::string) {
   message.append(!exMsg.empty() ? exMsg : ": Transaction rolled back");
   throw RollbackException{message};
 }
@@ -348,10 +342,9 @@ using apache::geode::client::UnknownException;
   throw CommitConflictException{message};
 }
 
-    [[noreturn]] void transactionDataRebalancedException(std::string message,
-                                                         std::string& exMsg,
-                                                         GfErrType,
-                                                         std::string) {
+[[noreturn]] void transactionDataRebalancedException(std::string message,
+                                                     std::string& exMsg,
+                                                     GfErrType, std::string) {
   message.append(!exMsg.empty() ? exMsg
                                 : ": Transaction data rebalanced exception");
   throw TransactionDataRebalancedException{message};
@@ -367,9 +360,9 @@ using apache::geode::client::UnknownException;
   throw TransactionDataNodeHasDepartedException{message};
 }
 
-    [[noreturn]] void putAllPartialResultException(std::string message,
-                                                   std::string& exMsg,
-                                                   GfErrType, std::string) {
+[[noreturn]] void putAllPartialResultException(std::string message,
+                                               std::string& exMsg, GfErrType,
+                                               std::string) {
   message.append(!exMsg.empty() ? exMsg : ": PutAll Partial exception");
   throw PutAllPartialResultException{message};
 }
@@ -380,9 +373,9 @@ using apache::geode::client::UnknownException;
   throw LowMemoryException{message};
 }
 
-    [[noreturn]] void queryLowMemoryException(std::string message,
-                                              std::string& exMsg, GfErrType,
-                                              std::string) {
+[[noreturn]] void queryLowMemoryException(std::string message,
+                                          std::string& exMsg, GfErrType,
+                                          std::string) {
   message.append(!exMsg.empty() ? exMsg
                                 : ": Query execution low memory exception");
   throw QueryExecutionLowMemoryException{message};
diff --git a/cppcache/src/Pool.cpp b/cppcache/src/Pool.cpp
index 9983071..d8ad4c2 100644
--- a/cppcache/src/Pool.cpp
+++ b/cppcache/src/Pool.cpp
@@ -45,8 +45,11 @@ std::chrono::milliseconds Pool::getReadTimeout() const {
   return m_attrs->getReadTimeout();
 }
 
-std::string Pool::getSniProxyHost() const { return m_attrs->getSniProxyHost(); }
-int Pool::getSniProxyPort() const { return m_attrs->getSniProxyPort(); }
+const std::string& Pool::getSniProxyHost() const {
+  return m_attrs->getSniProxyHost();
+}
+
+uint16_t Pool::getSniProxyPort() const { return m_attrs->getSniProxyPort(); }
 
 int Pool::getMinConnections() const { return m_attrs->getMinConnections(); }
 
diff --git a/cppcache/src/PoolAttributes.hpp b/cppcache/src/PoolAttributes.hpp
index 44d9633..5af3b26 100644
--- a/cppcache/src/PoolAttributes.hpp
+++ b/cppcache/src/PoolAttributes.hpp
@@ -123,11 +123,11 @@ class PoolAttributes {
 
   const std::string& getSniProxyHost() const { return m_sniProxyHost; }
 
-  void setSniProxyHost(const std::string& host) { m_sniProxyHost = host; }
+  void setSniProxyHost(std::string host) { m_sniProxyHost = std::move(host); }
 
-  int getSniProxyPort() const { return m_sniProxyPort; }
+  uint16_t getSniProxyPort() const { return m_sniProxyPort; }
 
-  void setSniProxyPort(const int port) { m_sniProxyPort = port; }
+  void setSniProxyPort(const uint16_t port) { m_sniProxyPort = port; }
 
   const std::string& getServerGroup() const { return m_serverGrp; }
 
@@ -203,7 +203,7 @@ class PoolAttributes {
   std::vector<std::string> m_initServList;
 
   std::string m_sniProxyHost;
-  int m_sniProxyPort;
+  uint16_t m_sniProxyPort;
 
   static bool compareVectorOfStrings(
       const std::vector<std::string>& thisVector,
diff --git a/cppcache/src/PoolFactory.cpp b/cppcache/src/PoolFactory.cpp
index 9a43f64..ad9038d 100644
--- a/cppcache/src/PoolFactory.cpp
+++ b/cppcache/src/PoolFactory.cpp
@@ -185,9 +185,8 @@ PoolFactory& PoolFactory::addServer(const std::string& host, int port) {
   return *this;
 }
 
-PoolFactory& PoolFactory::setSniProxy(const std::string& hostname,
-                                      const int port) {
-  m_attrs->setSniProxyHost(hostname);
+PoolFactory& PoolFactory::setSniProxy(std::string hostname, uint16_t port) {
+  m_attrs->setSniProxyHost(std::move(hostname));
   m_attrs->setSniProxyPort(port);
   return *this;
 }
diff --git a/cppcache/src/RegionAttributes.cpp b/cppcache/src/RegionAttributes.cpp
index 4276d71..f576ad1 100644
--- a/cppcache/src/RegionAttributes.cpp
+++ b/cppcache/src/RegionAttributes.cpp
@@ -64,8 +64,9 @@ std::shared_ptr<CacheLoader> RegionAttributes::getCacheLoader() const {
     if (CacheXmlParser::managedCacheLoaderFn_ &&
         m_cacheLoaderFactory.find('.') != std::string::npos) {
       // this is a managed library
-      m_cacheLoader.reset((CacheXmlParser::managedCacheLoaderFn_)(
-          m_cacheLoaderLibrary.c_str(), m_cacheLoaderFactory.c_str()));
+      m_cacheLoader.reset((
+          CacheXmlParser::managedCacheLoaderFn_)(m_cacheLoaderLibrary.c_str(),
+                                                 m_cacheLoaderFactory.c_str()));
     } else {
       auto funcptr = Utils::getFactoryFunction<CacheLoader*()>(
           m_cacheLoaderLibrary, m_cacheLoaderFactory);
@@ -80,8 +81,9 @@ std::shared_ptr<CacheWriter> RegionAttributes::getCacheWriter() const {
     if (CacheXmlParser::managedCacheWriterFn_ &&
         m_cacheWriterFactory.find('.') != std::string::npos) {
       // this is a managed library
-      m_cacheWriter.reset((CacheXmlParser::managedCacheWriterFn_)(
-          m_cacheWriterLibrary.c_str(), m_cacheWriterFactory.c_str()));
+      m_cacheWriter.reset((
+          CacheXmlParser::managedCacheWriterFn_)(m_cacheWriterLibrary.c_str(),
+                                                 m_cacheWriterFactory.c_str()));
     } else {
       auto funcptr = Utils::getFactoryFunction<CacheWriter*()>(
           m_cacheWriterLibrary, m_cacheWriterFactory);
@@ -96,8 +98,11 @@ std::shared_ptr<CacheListener> RegionAttributes::getCacheListener() const {
     if (CacheXmlParser::managedCacheListenerFn_ &&
         m_cacheListenerFactory.find('.') != std::string::npos) {
       // this is a managed library
-      m_cacheListener.reset((CacheXmlParser::managedCacheListenerFn_)(
-          m_cacheListenerLibrary.c_str(), m_cacheListenerFactory.c_str()));
+      m_cacheListener.reset(
+          (CacheXmlParser::managedCacheListenerFn_)(m_cacheListenerLibrary
+                                                        .c_str(),
+                                                    m_cacheListenerFactory
+                                                        .c_str()));
     } else {
       auto funcptr = Utils::getFactoryFunction<CacheListener*()>(
           m_cacheListenerLibrary, m_cacheListenerFactory);
@@ -113,9 +118,10 @@ std::shared_ptr<PartitionResolver> RegionAttributes::getPartitionResolver()
     if (CacheXmlParser::managedPartitionResolverFn_ &&
         m_partitionResolverFactory.find('.') != std::string::npos) {
       // this is a managed library
-      m_partitionResolver.reset((CacheXmlParser::managedPartitionResolverFn_)(
-          m_partitionResolverLibrary.c_str(),
-          m_partitionResolverFactory.c_str()));
+      m_partitionResolver.reset((
+          CacheXmlParser::
+              managedPartitionResolverFn_)(m_partitionResolverLibrary.c_str(),
+                                           m_partitionResolverFactory.c_str()));
     } else {
       auto funcptr = Utils::getFactoryFunction<PartitionResolver*()>(
           m_partitionResolverLibrary, m_partitionResolverFactory);
@@ -131,8 +137,11 @@ std::shared_ptr<PersistenceManager> RegionAttributes::getPersistenceManager()
     if (CacheXmlParser::managedPersistenceManagerFn_ &&
         m_persistenceFactory.find('.') != std::string::npos) {
       // this is a managed library
-      m_persistenceManager.reset((CacheXmlParser::managedPersistenceManagerFn_)(
-          m_persistenceLibrary.c_str(), m_persistenceFactory.c_str()));
+      m_persistenceManager.reset(
+          (CacheXmlParser::managedPersistenceManagerFn_)(m_persistenceLibrary
+                                                             .c_str(),
+                                                         m_persistenceFactory
+                                                             .c_str()));
     } else {
       auto funcptr = Utils::getFactoryFunction<PersistenceManager*()>(
           m_persistenceLibrary, m_persistenceFactory);
diff --git a/cppcache/src/TcrConnection.cpp b/cppcache/src/TcrConnection.cpp
index 3c598f7..6a559ad 100644
--- a/cppcache/src/TcrConnection.cpp
+++ b/cppcache/src/TcrConnection.cpp
@@ -432,18 +432,18 @@ Connector* TcrConnection::createConnection(
                                ->getDistributedSystem()
                                .getSystemProperties();
   if (systemProperties.sslEnabled()) {
-    auto sniHostname = m_poolDM->getSNIProxyHostname();
-    auto sniPort = m_poolDM->getSNIPort();
+    const auto& sniHostname = m_poolDM->getSniProxyHost();
     if (sniHostname.empty()) {
       socket = new TcpSslConn(address, connectTimeout, maxBuffSizePool,
                               systemProperties.sslTrustStore(),
                               systemProperties.sslKeyStore(),
                               systemProperties.sslKeystorePassword());
     } else {
+      const auto sniPort = m_poolDM->getSniProxyPort();
       socket = new TcpSslConn(
           address, connectTimeout, maxBuffSizePool, sniHostname, sniPort,
           systemProperties.sslTrustStore(), systemProperties.sslKeyStore(),
-          systemProperties.sslKeystorePassword());
+          systemProperties.sslKeystorePassword();
     }
   } else {
     socket = new TcpConn(address, connectTimeout, maxBuffSizePool);
diff --git a/cppcache/src/ThinClientPoolDM.hpp b/cppcache/src/ThinClientPoolDM.hpp
index 1c2d789..4021d10 100644
--- a/cppcache/src/ThinClientPoolDM.hpp
+++ b/cppcache/src/ThinClientPoolDM.hpp
@@ -168,8 +168,6 @@ class ThinClientPoolDM
   GfErrType getConnectionToAnEndPoint(std::string epNameStr,
                                       TcrConnection*& conn);
 
-  const std::string getSNIProxyHostname() { return m_attrs->getSniProxyHost(); }
-  uint16_t getSNIPort() { return m_attrs->getSniProxyPort(); }
   virtual inline bool isSticky() { return m_sticky; }
   virtual TcrEndpoint* getEndPoint(
       const std::shared_ptr<BucketServerLocation>& serverLocation,
diff --git a/cppcache/src/VersionedCacheableObjectPartList.cpp b/cppcache/src/VersionedCacheableObjectPartList.cpp
index 15b8ea3..3dd4639 100644
--- a/cppcache/src/VersionedCacheableObjectPartList.cpp
+++ b/cppcache/src/VersionedCacheableObjectPartList.cpp
@@ -232,7 +232,9 @@ void VersionedCacheableObjectPartList::fromData(DataInput& input) {
           versionTag->setInternalMemID(ids.at(idNumber));
           break;
         }
-        default: { break; }
+        default: {
+          break;
+        }
       }
       m_versionTags[index] = versionTag;
     }