summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/Instance.cpp
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2007-05-16 13:14:53 +0000
committerDwayne Boone <dwayne@zeroc.com>2007-05-16 13:14:53 +0000
commit97471800e2eea67243ef838a74634b83a51f9cb9 (patch)
treedc4427a9b5baf9c332570f53fd89c1458bef9051 /cpp/src/Ice/Instance.cpp
parentFixed mono compile errors (diff)
downloadice-97471800e2eea67243ef838a74634b83a51f9cb9.tar.bz2
ice-97471800e2eea67243ef838a74634b83a51f9cb9.tar.xz
ice-97471800e2eea67243ef838a74634b83a51f9cb9.zip
Bug 1625 - unused property warning
Diffstat (limited to 'cpp/src/Ice/Instance.cpp')
-rw-r--r--cpp/src/Ice/Instance.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/cpp/src/Ice/Instance.cpp b/cpp/src/Ice/Instance.cpp
index 81dfa2fc9bc..7fd7ef6c555 100644
--- a/cpp/src/Ice/Instance.cpp
+++ b/cpp/src/Ice/Instance.cpp
@@ -24,7 +24,7 @@
#include <Ice/LocalException.h>
#include <Ice/ObjectAdapterFactory.h>
#include <Ice/Exception.h>
-#include <Ice/Properties.h>
+#include <Ice/PropertiesI.h>
#include <Ice/LoggerI.h>
#include <Ice/Network.h>
#include <Ice/EndpointFactoryManager.h>
@@ -33,6 +33,7 @@
#include <Ice/DynamicLibrary.h>
#include <Ice/PluginManagerI.h>
#include <Ice/Initialize.h>
+#include <Ice/LoggerUtil.h>
#include <IceUtil/StringUtil.h>
#include <stdio.h>
@@ -936,6 +937,20 @@ IceInternal::Instance::destroy()
{
serverThreadPool->joinWithAllThreads();
}
+
+ if(_initData.properties->getPropertyAsInt("Ice.Warn.UnusedProperties") > 0)
+ {
+ set<string> unusedProperties = static_cast<PropertiesI*>(_initData.properties.get())->getUnusedProperties();
+ if(unusedProperties.size() != 0)
+ {
+ Warning out(_initData.logger);
+ out << "The following properties were set but never read:";
+ for(set<string>::const_iterator p = unusedProperties.begin(); p != unusedProperties.end(); ++p)
+ {
+ out << "\n " << *p;
+ }
+ }
+ }
return true;
}