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 b6465dd5428d4f6b6cd251ceb2a028e37262d66c
Author: juanpablo <[email protected]>
AuthorDate: Mon Jan 20 22:17:14 2020 +0100

    WikiEngine init'd check must be done only on new constructor
---
 jspwiki-main/src/main/java/org/apache/wiki/WikiContext.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/jspwiki-main/src/main/java/org/apache/wiki/WikiContext.java 
b/jspwiki-main/src/main/java/org/apache/wiki/WikiContext.java
index 939a843..6fa1dab 100644
--- a/jspwiki-main/src/main/java/org/apache/wiki/WikiContext.java
+++ b/jspwiki-main/src/main/java/org/apache/wiki/WikiContext.java
@@ -194,9 +194,6 @@ public class WikiContext implements Cloneable, Command {
         if ( engine == null || command == null ) {
             throw new IllegalArgumentException( "Parameter engine and command 
must not be null." );
         }
-        if( !engine.isConfigured() ) {
-            throw new InternalWikiException( "WikiEngine has not been properly 
started.  It is likely that the configuration is faulty.  Please check all logs 
for the possible reason." );
-        }
 
         m_engine = engine;
         m_request = request;
@@ -263,6 +260,9 @@ public class WikiContext implements Cloneable, Command {
      */
     public WikiContext( final WikiEngine engine, final HttpServletRequest 
request, final String requestContext ) {
         this( engine, request, engine.getCommandResolver().findCommand( 
request, requestContext ) );
+        if( !engine.isConfigured() ) {
+            throw new InternalWikiException( "WikiEngine has not been properly 
started.  It is likely that the configuration is faulty.  Please check all logs 
for the possible reason." );
+        }
     }
 
     /**

Reply via email to