This is an automated email from the ASF dual-hosted git repository.
swebb2066 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
The following commit(s) were added to refs/heads/master by this push:
new da5cfaf6 Prevent potential fault configuring a user-defined Level
(#559)
da5cfaf6 is described below
commit da5cfaf63bbcfee75058481f5885c5718b36c945
Author: Stephen Webb <[email protected]>
AuthorDate: Fri Oct 31 09:00:14 2025 +1100
Prevent potential fault configuring a user-defined Level (#559)
---
src/main/cpp/domconfigurator.cpp | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/src/main/cpp/domconfigurator.cpp b/src/main/cpp/domconfigurator.cpp
index 6983c9be..d54a092a 100644
--- a/src/main/cpp/domconfigurator.cpp
+++ b/src/main/cpp/domconfigurator.cpp
@@ -824,10 +824,7 @@ void DOMConfigurator::parseLevel(
try
{
- Level::LevelClass& levelClass =
-
(Level::LevelClass&)Loader::loadClass(className);
- LevelPtr level = levelClass.toLevel(levelStr);
- logger->setLevel(level);
+ logger->setLevel(dynamic_cast<const
Level::LevelClass&>(Loader::loadClass(className)).toLevel(levelStr));
}
catch (Exception& oops)
{