Jon Stevens <[EMAIL PROTECTED]> writes:

> Uh Dan. Try compiling the code with Deprecation on.
> 
> You (or someone else) deprecated FileHandler.

I only added deprecation to FileHandler (methods) because Jason had
deprecated it at the class level and I was under the impression that
that didn't print any compiler warning messages.  Jason informs me
that the compiler does in fact produce deprecation messages for
class-level deprecation.

> Why point at deprecated code
> when there is non-deprecated code that you can point at?

The code in the diff below actually creates an endless loop, since
TurbineUpload's parseRequest() method does nothing but call the
configured upload service's parseRequest() method (which would most
likely be FileHandlerUploadService if its method was called in the
first place).

I suggest switching the deprecation of util.upload.FileHandler to
services.upload.FileHandlerUploadService, which is the "outermost"
interface (i.e. not directly accessed by other Turbine code).

> Yes, there was a reason for the change. We get deprecated warnings for no
> reason.
> 
> on 5/20/01 9:38 AM, "Daniel Rall" <[EMAIL PROTECTED]> wrote:
> 
> > Service implementations should not reference their wrapper code.
> > Since there's no reasoning for this change in the commit log, -1.
> > 
> > 
> >>   Index: FileHandlerUploadService.java
> >>   ===================================================================
> >>   RCS file: 
> >> /home/cvs/jakarta-turbine/src/java/org/apache/turbine/services/upload/FileHan
> >> dlerUploadService.java,v
> >>   retrieving revision 1.7
> >>   retrieving revision 1.8
> >>   diff -u -r1.7 -r1.8
> >>   --- FileHandlerUploadService.java    2001/05/18 18:25:55    1.7
> >>   +++ FileHandlerUploadService.java    2001/05/20 00:04:05    1.8
> >>   @@ -58,7 +58,7 @@
> >>    import org.apache.turbine.services.TurbineBaseService;
> >>    import org.apache.turbine.util.ParameterParser;
> >>    import org.apache.turbine.util.TurbineException;
> >>   -import org.apache.turbine.util.upload.FileHandler;
> >>   +//import org.apache.turbine.util.upload.FileHandler;
> >>    
> >>    /**
> >>     * <p> This is an implementation of {@link UploadService} that uses
> >>   @@ -71,7 +71,7 @@
> >>     *
> >>     * @author <a href="mailto:[EMAIL PROTECTED]";>Rafal Krzewski</a>
> >>     * @author <a href="mailto:[EMAIL PROTECTED]";>Daniel Rall</a>
> >>   - * @version $Id: FileHandlerUploadService.java,v 1.7 2001/05/18 18:25:55
> >> dlr Exp $
> >>   + * @version $Id: FileHandlerUploadService.java,v 1.8 2001/05/20 00:04:05
> >> jon Exp $
> >>     * @deprecated use TurbineUploadService
> >>     */
> >>    public class FileHandlerUploadService
> >>   @@ -93,6 +93,8 @@
> >>                                  String path )
> >>            throws TurbineException
> >>        {
> >>   +        TurbineUpload.parseRequest(req, params, path);
> >>   +    /*
> >>            String fileRepository = getRepository();
> >>            FileHandler handler = new FileHandler( req, params, fileRepository
> >> );
> >>            handler.setMaxSize( getSizeMax() );
> >>   @@ -105,5 +107,6 @@
> >>                throw new TurbineException("File upload using FileHandler
> >> failed",
> >>                                           e);
> >>            }
> >>   +        */
> >>        }
> >>    }

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to