Author: tmortagne
Date: 2007-11-12 16:05:12 +0100 (Mon, 12 Nov 2007)
New Revision: 5829

Modified:
   
xwiki-platform/xwiki-plugins/trunk/wiki-manager/src/main/java/com/xpn/xwiki/plugin/wikimanager/WikiManager.java
Log:
* Delete unreachable code
* Change from error to warning generally when wiki schema to create already 
exist.

Modified: 
xwiki-platform/xwiki-plugins/trunk/wiki-manager/src/main/java/com/xpn/xwiki/plugin/wikimanager/WikiManager.java
===================================================================
--- 
xwiki-platform/xwiki-plugins/trunk/wiki-manager/src/main/java/com/xpn/xwiki/plugin/wikimanager/WikiManager.java
     2007-11-12 14:08:11 UTC (rev 5828)
+++ 
xwiki-platform/xwiki-plugins/trunk/wiki-manager/src/main/java/com/xpn/xwiki/plugin/wikimanager/WikiManager.java
     2007-11-12 15:05:12 UTC (rev 5829)
@@ -662,20 +662,8 @@
         // Create database/schema
         try {
             xwiki.getStore().createWiki(targetWiki, context);
-        } catch (XWikiException e) {
-            if (LOG.isErrorEnabled()) {
-                if (e.getCode() == 10010) {
-                    
LOG.error(msg.get(WikiManagerMessageTool.LOG_DATABASEALREADYEXISTS,
-                        targetWiki));
-                } else if (e.getCode() == 10011) {
-                    
LOG.error(msg.get(WikiManagerMessageTool.LOG_DATABASECREATION, targetWiki));
-                } else {
-                    
LOG.error(msg.get(WikiManagerMessageTool.LOG_DATABASECREATIONEXCEPTION,
-                        targetWiki), e);
-                }
-            }
         } catch (Exception e) {
-            
LOG.error(msg.get(WikiManagerMessageTool.LOG_DATABASECREATIONEXCEPTION, 
targetWiki),
+            
LOG.warn(msg.get(WikiManagerMessageTool.LOG_DATABASECREATIONEXCEPTION, 
targetWiki),
                 e);
         }
 
@@ -906,7 +894,6 @@
         
wikiSuperDocument.setVisibility(XWikiServerClass.FIELDL_VISIBILITY_TEMPLATE);
 
         // Create empty wiki
-        WikiManager.getInstance().createNewWikiFromPackage(wikiSuperDocument, 
packageName, false,
-            comment, context);
+        createNewWikiFromPackage(wikiSuperDocument, packageName, false, 
comment, context);
     }
 }

_______________________________________________
notifications mailing list
notifications@xwiki.org
http://lists.xwiki.org/mailman/listinfo/notifications

Reply via email to