On May 12, 2010, at 6:06 AM, sdumitriu (SVN) wrote:
Author: sdumitriu
Date: 2010-05-12 06:06:25 +0200 (Wed, 12 May 2010)
New Revision: 28837
Modified:
platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/XWiki.java
Log:
[cleanup] Applied codestyle, fixed some deprecated calls, replaced string names with
proper document references
Modified: platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/XWiki.java
===================================================================
--- platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/XWiki.java 2010-05-11
17:47:17 UTC (rev 28836)
+++ platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/XWiki.java 2010-05-12
04:06:25 UTC (rev 28837)
@@ -67,6 +67,7 @@
import org.apache.commons.httpclient.auth.AuthScope;
import org.apache.commons.httpclient.methods.GetMethod;
import org.apache.commons.httpclient.util.URIUtil;
+import org.apache.commons.io.IOUtils;
import org.apache.commons.lang.RandomStringUtils;
import org.apache.commons.lang.StringEscapeUtils;
import org.apache.commons.lang.StringUtils;
@@ -106,6 +107,8 @@
import org.xwiki.observation.event.DocumentUpdateEvent;
import org.xwiki.query.QueryException;
import org.xwiki.rendering.macro.wikibridge.WikiMacroInitializer;
+import org.xwiki.url.XWikiEntityURL;
+import org.xwiki.url.standard.XWikiURLBuilder;
import com.xpn.xwiki.api.Api;
import com.xpn.xwiki.api.Document;
@@ -180,13 +183,15 @@
import com.xpn.xwiki.web.XWikiURLFactoryService;
import com.xpn.xwiki.web.XWikiURLFactoryServiceImpl;
import com.xpn.xwiki.web.includeservletasstring.IncludeServletAsString;
-import org.xwiki.url.XWikiEntityURL;
-import org.xwiki.url.standard.XWikiURLBuilder;
public class XWiki implements XWikiDocChangeNotificationInterface
{
protected static final Log LOG = LogFactory.getLog(XWiki.class);
+ /** Frequently used Document reference, the class which holds virtual wiki
definitions. */
+ private static final DocumentReference VIRTUAL_WIKI_DEFINITION_CLASSNAME =
+ new DocumentReference("xwiki", "XWiki",
"XWikiServerClass");
I'd use CLASS_REFERENCE instead of Classname.
+
private XWikiConfig config;
private XWikiStoreInterface store;
@@ -212,6 +217,7 @@
private XWikiPluginManager pluginManager;
+ @SuppressWarnings("deprecation")
private XWikiNotificationManager notificationManager;
Why suppress the warning? We should use the new notification manager and remove this one.
private XWikiAuthService authService;
@@ -297,15 +303,18 @@
/**
* Used to convert a proper Document Reference to string (standard form).
*/
+ @SuppressWarnings("unchecked")
private EntityReferenceSerializer<String> defaultEntityReferenceSerializer =
Utils.getComponent(EntityReferenceSerializer.class);
[snip]
(haven't really checked the rest)
Thanks
-Vincent