pivotal-jbarrett commented on code in PR #969: URL: https://github.com/apache/geode-native/pull/969#discussion_r869292240
########## cppcache/src/CacheableObjectArray.cpp: ########## @@ -53,6 +54,18 @@ size_t CacheableObjectArray::objectSize() const { } return size; } + +std::string CacheableObjectArray::getClassName() const { + if (!empty()) { + auto&& item = *begin(); + + if (auto pdx = dynamic_cast<PdxSerializable*>(item.get())) { + return pdx->getClassName(); + } + } + + return "java.lang.Object"; Review Comment: What if we make this string a `const` value in this compilation unit and change the return type of this method to return `const std::string&` so we aren't copy constructing strings on return. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@geode.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org