Yes it is set in 2 places because one is needed for tests and the
other for running. I wanted to set it in shared-tests but I can't
because shared-tests depends on core 1.4 so it has no access to
Utils.setComponentManager....

On Wed, May 28, 2008 at 9:15 AM, Vincent Massol <[EMAIL PROTECTED]> wrote:
> Thomas, does this mean it's now set in 2 places?
>
> If so I think that's not correct.
>
> Thanks
> -Vincent
>
> On May 27, 2008, at 10:58 PM, tmortagne (SVN) wrote:
>
>> Author: tmortagne
>> Date: 2008-05-27 22:58:40 +0200 (Tue, 27 May 2008)
>> New Revision: 9956
>>
>> Modified:
>>   xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/
>> XWiki.java
>> Log:
>> XWIKI-2367: Makes ComponentManager getable without the XWikiContext
>> * Reset ComponentManager in XWiki.initXWiki as shared-test can't
>> call Utils.setComponentManager
>>
>> Modified: xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/
>> xwiki/XWiki.java
>> ===================================================================
>> --- xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/
>> XWiki.java    2008-05-27 19:37:05 UTC (rev 9955)
>> +++ xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/
>> XWiki.java    2008-05-27 20:58:40 UTC (rev 9956)
>> @@ -737,6 +737,11 @@
>>     public void initXWiki(XWikiConfig config, XWikiContext context,
>>         XWikiEngineContext engine_context, boolean noupdate) throws
>> XWikiException
>>     {
>> +        // Statically store the component manager in [EMAIL PROTECTED] 
>> Utils}
>> to be able to access it without
>> +        // the context.
>> +        Utils.setComponentManager((ComponentManager) context
>> +            .get(ComponentManager.class.getName()));
>> +
>>         setEngineContext(engine_context);
>>         context.setWiki(this);
> _______________________________________________
> devs mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/devs
>



-- 
Thomas Mortagne
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to