celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pnol...@apache.org
Subject [celix] branch develop updated: Fixes an issues with C++ properties using std::string and being assigned nullptr values.
Date Wed, 11 Sep 2019 16:47:53 GMT
This is an automated email from the ASF dual-hosted git repository.

pnoltes pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/celix.git


The following commit(s) were added to refs/heads/develop by this push:
     new 220e9ae  Fixes an issues with C++ properties using std::string and being assigned
nullptr values.
220e9ae is described below

commit 220e9aea563cc16c0e3ab74547d35d69478c8c27
Author: Pepijn Noltes <pepijnnoltes@gmail.com>
AuthorDate: Wed Sep 11 18:47:01 2019 +0200

    Fixes an issues with C++ properties using std::string and being assigned nullptr values.
---
 libs/framework/include/celix/dm/ServiceDependency_Impl.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libs/framework/include/celix/dm/ServiceDependency_Impl.h b/libs/framework/include/celix/dm/ServiceDependency_Impl.h
index 604c199..a33a4ce 100644
--- a/libs/framework/include/celix/dm/ServiceDependency_Impl.h
+++ b/libs/framework/include/celix/dm/ServiceDependency_Impl.h
@@ -201,7 +201,7 @@ int CServiceDependency<T,I>::invokeCallback(std::function<void(const
I*, Propert
         hash_map_iterator_t iter = hashMapIterator_construct((hash_map_pt)props);
         while(hashMapIterator_hasNext(&iter)) {
             key = (const char*) hashMapIterator_nextKey(&iter);
-            value = celix_properties_get(props, key, NULL);
+            value = celix_properties_get(props, key, ""); //note. C++ does not allow nullptr
entries for std::string
             //std::cout << "got property " << key << "=" << value
<< "\n";
             properties[key] = value;
         }


Mime
View raw message