On Thu, 2008-08-21 at 14:02 +0200, Thorsten Scherler wrote:
> On Thu, 2008-08-21 at 20:16 +1000, David Crossley wrote:
> > I am updating our $FORREST_HOME/etc/cocoon_upgrade stuff so
> > that we can easily repeat a build of the cocoon-2.1 jars.
> > That will also help me to get on with fixing our cocoon.xconf
> > 
> > Finished for tonight - will pick up again tomorrow.
> > 
> > By the way, do you get some deprecation warnings when doing
> 
> Yeah, have not come around to them yet.

Compiling 32 source files
to /home/thorsten/src/apache/forrest/trunk/build/classes
/home/thorsten/src/apache/forrest/trunk/main/java/org/apache/forrest/log/ForrestLogTargetFactory.java:22:
 warning: [deprecation] org.apache.cocoon.util.log.CocoonTargetFactory in 
org.apache.cocoon.util.log has been deprecated
import org.apache.cocoon.util.log.CocoonTargetFactory;
                                  ^
/home/thorsten/src/apache/forrest/trunk/main/java/org/apache/forrest/log/ForrestLogTargetFactory.java:30:
 warning: [deprecation] org.apache.cocoon.util.log.CocoonTargetFactory in 
org.apache.cocoon.util.log has been deprecated
    extends CocoonTargetFactory {
            ^
/home/thorsten/src/apache/forrest/trunk/main/java/org/apache/forrest/locationmap/lm/LocationMap.java:256:
 warning: [deprecation] 
compose(java.lang.Object,org.apache.avalon.framework.component.ComponentManager)
 in org.apache.avalon.framework.container.ContainerUtil has been deprecated
        ContainerUtil.compose(context, new
WrapperComponentManager(m_manager));
                     ^
3 warnings


The first two warning are because the CocoonTargetFactory is deprecated.
The comment states "This class will be removed in 2.2".

However we could use 
@SuppressWarnings("deprecation") for ForrestLogTargetFactory, this
however only is allowed in jdk 1.5 and higher. Or implement the methods
that offers cocoon in this class (it is pretty simple stuff).

The third warning is from avalon
http://excalibur.apache.org/apidocs/org/apache/avalon/framework/container/ContainerUtil.html#compose(java.lang.Object,
 org.apache.avalon.framework.component.ComponentManager)

Our code is the following:
ContainerUtil.compose(context, new WrapperComponentManager(m_manager));
ContainerUtil.service(context, m_manager);

and the above link states: "Deprecated. compose() is no longer the
preferred method via which components will be supplied with Components.
Please Use service() from Composable instead." So we may just delete the
compose line as I understand it. However not sure about that.

salu2
-- 
Thorsten Scherler                                 thorsten.at.apache.org
Open Source Java                      consulting, training and solutions