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

juanpablo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jspwiki.git

commit fb2694e05b7037b69bb5100f1ed823423af7d50f
Author: Juan Pablo Santos Rodríguez <[email protected]>
AuthorDate: Thu Dec 2 17:03:01 2021 +0100

    WikiEngine#initComponent() now asks the mappedClass if is Initializable 
instead of asking the requestedClass on classmappings.xml
    
    This allows to decouple Initializable from the mapped managers, as it 
should only matter if their implementations are Initializable in order to init 
them
---
 jspwiki-main/src/main/java/org/apache/wiki/WikiEngine.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/jspwiki-main/src/main/java/org/apache/wiki/WikiEngine.java 
b/jspwiki-main/src/main/java/org/apache/wiki/WikiEngine.java
index 5d8b64a..ff4f010 100644
--- a/jspwiki-main/src/main/java/org/apache/wiki/WikiEngine.java
+++ b/jspwiki-main/src/main/java/org/apache/wiki/WikiEngine.java
@@ -404,7 +404,7 @@ public class WikiEngine implements Engine {
             component = ClassUtil.getMappedObject( componentInitClass, 
initArgs );
         }
         managers.put( componentClass, component );
-        if( Initializable.class.isAssignableFrom( componentClass ) ) {
+        if( Initializable.class.isAssignableFrom( component.getClass() ) ) {
             ( ( Initializable )component ).initialize( this, m_properties );
         }
     }

Reply via email to