cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject cvs commit: cocoon-2.1/src/blocks/mail/java/org/apache/cocoon/mail MailMessageSender.java
Date Wed, 24 Sep 2003 22:34:53 GMT
cziegeler    2003/09/24 15:34:53

  Modified:    src/deprecated/java/org/apache/cocoon/components/store
                        MRUMemoryStore.java FilesystemStore.java
               src/blocks/taglib/java/org/apache/cocoon/taglib/core
                        SourceTag.java LoopTagSupport.java
               src/blocks/scratchpad/java/org/apache/cocoon/components/source/impl
                        RefresherImpl.java UpdateTarget.java
               src/blocks/webdav/java/org/apache/cocoon/components/source/impl
                        WebDAVSourceFactory.java WebDAVSource.java
               src/blocks/taglib/java/org/apache/cocoon/transformation
                        TagTransformer.java
               src/blocks/scratchpad/java/org/apache/cocoon/generation
                        JellyGenerator.java FlowVelocityGenerator.java
                        RequestAttributeGenerator.java
               src/blocks/slide/java/org/apache/cocoon/components/source/impl
                        GIFSourceInspector.java SlideSource.java
               src/blocks/scratchpad/java/org/apache/cocoon/reading
                        DirectoryZipArchiver.java
               src/blocks/slide/java/org/apache/cocoon/components/repository/impl
                        SlidePrincipalProvider.java
               src/deprecated/java/org/apache/cocoon/components/source
                        FileSource.java
               src/blocks/velocity/java/org/apache/cocoon/generation
                        VelocityGenerator.java
               src/blocks/mail/java/org/apache/cocoon/mail
                        MailMessageSender.java
  Log:
  Removing unused imports and casts
  
  Revision  Changes    Path
  1.4       +2 -2      cocoon-2.1/src/deprecated/java/org/apache/cocoon/components/store/MRUMemoryStore.java
  
  Index: MRUMemoryStore.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/deprecated/java/org/apache/cocoon/components/store/MRUMemoryStore.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- MRUMemoryStore.java	27 Apr 2003 16:41:31 -0000	1.3
  +++ MRUMemoryStore.java	24 Sep 2003 22:34:52 -0000	1.4
  @@ -92,7 +92,7 @@
   
       private int maxobjects;
       private boolean persistent;
  -    private MRUBucketMap cache;
  +    protected MRUBucketMap cache;
       private Store persistentStore;
       private StoreJanitor storeJanitor;
       private ComponentManager manager;
  
  
  
  1.2       +5 -5      cocoon-2.1/src/deprecated/java/org/apache/cocoon/components/store/FilesystemStore.java
  
  Index: FilesystemStore.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/deprecated/java/org/apache/cocoon/components/store/FilesystemStore.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FilesystemStore.java	9 Mar 2003 00:07:05 -0000	1.1
  +++ FilesystemStore.java	24 Sep 2003 22:34:52 -0000	1.2
  @@ -237,7 +237,7 @@
       public synchronized void hold(final Object key, final Object value)
       throws IOException {
           this.store(key, value);
  -        final File file = (File) this.fileFromKey(key);
  +        final File file = this.fileFromKey(key);
           if (file != null) {
             file.deleteOnExit();
           }
  @@ -347,7 +347,7 @@
   
       public String getString(final Object key)
       throws IOException {
  -        final File file = (File) this.fileFromKey(key);
  +        final File file = this.fileFromKey(key);
           if (file != null) {
               return IOUtils.deserializeString(file);
           }
  @@ -360,7 +360,7 @@
       public synchronized Object getObject(final Object key)
       throws IOException, ClassNotFoundException
       {
  -        final File file = (File) this.fileFromKey(key);
  +        final File file = this.fileFromKey(key);
           if (file != null) {
               return IOUtils.deserializeObject(file);
           }
  @@ -424,7 +424,7 @@
           final OutputStreamWriter writer = new OutputStreamWriter( buf );
           for (int i = 0; i < s.length(); i++)
           {
  -            int c = (int)s.charAt(i);
  +            int c = s.charAt(i);
               if (charactersDontNeedingEncoding.get(c))
               {
                   out.append((char)c);
  
  
  
  1.3       +2 -17     cocoon-2.1/src/blocks/taglib/java/org/apache/cocoon/taglib/core/SourceTag.java
  
  Index: SourceTag.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/taglib/java/org/apache/cocoon/taglib/core/SourceTag.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SourceTag.java	16 Mar 2003 17:49:08 -0000	1.2
  +++ SourceTag.java	24 Sep 2003 22:34:52 -0000	1.3
  @@ -50,10 +50,6 @@
   */
   package org.apache.cocoon.taglib.core;
   
  -import org.apache.avalon.framework.component.ComponentException;
  -import org.apache.avalon.framework.component.ComponentManager;
  -import org.apache.avalon.framework.component.Composable;
  -
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.components.source.SourceUtil;
   import org.apache.cocoon.taglib.XMLProducerTagSupport;
  @@ -67,20 +63,9 @@
    * @author <a href="mailto:volker.schmitt@basf-it-services.com">Volker Schmitt</a>
    * @version CVS $Id$
    */
  -public class SourceTag extends XMLProducerTagSupport implements Composable {
  +public class SourceTag extends XMLProducerTagSupport {
       private String src;
       private EmbeddedXMLPipe embeddedXMLPipe = new EmbeddedXMLPipe(null);
  -
  -    /** The component manager instance */
  -    private ComponentManager manager = null;
  -
  -    /**
  -     * Set the current <code>ComponentManager</code> instance used by this
  -     * <code>Composable</code>.
  -     */
  -    public void compose(ComponentManager manager) throws ComponentException {
  -        this.manager = manager;
  -    }
   
       public void setSrc(String src) {
           this.src = src;
  
  
  
  1.3       +6 -6      cocoon-2.1/src/blocks/taglib/java/org/apache/cocoon/taglib/core/LoopTagSupport.java
  
  Index: LoopTagSupport.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/taglib/java/org/apache/cocoon/taglib/core/LoopTagSupport.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- LoopTagSupport.java	16 Mar 2003 17:49:08 -0000	1.2
  +++ LoopTagSupport.java	24 Sep 2003 22:34:52 -0000	1.3
  @@ -163,9 +163,9 @@
        */
       private LoopTagStatus status; // our LoopTagStatus
       private Object item; // the current item
  -    private int index; // the current internal index
  -    private int count; // the iteration count
  -    private boolean last; // current round == last one?
  +    protected int index; // the current internal index
  +    protected int count; // the iteration count
  +    protected boolean last; // current round == last one?
   
       //*********************************************************************
       // Constructor
  @@ -376,10 +376,10 @@
                   return (LoopTagSupport.this.getCurrent());
               }
               public int getIndex() {
  -                return (index + begin); // our 'index' isn't getIndex()
  +                return index + begin; // our 'index' isn't getIndex()
               }
               public int getCount() {
  -                return (count);
  +                return count;
               }
               public boolean isFirst() {
                   return (index == 0); // our 'index' isn't getIndex()
  
  
  
  1.2       +3 -3      cocoon-2.1/src/blocks/scratchpad/java/org/apache/cocoon/components/source/impl/RefresherImpl.java
  
  Index: RefresherImpl.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/scratchpad/java/org/apache/cocoon/components/source/impl/RefresherImpl.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- RefresherImpl.java	4 Sep 2003 12:42:34 -0000	1.1
  +++ RefresherImpl.java	24 Sep 2003 22:34:52 -0000	1.2
  @@ -149,7 +149,7 @@
                               final String name = cacheKey.getKey();
                               
                               this.scheduler.addPeriodicJob(name, this.schedulerTarget,
  -                                                  (long)expires,
  +                                                  expires,
                                                     true,
                                                     tc.parameters,
                                                     tc.map);
  @@ -240,7 +240,7 @@
           final String name = cacheKey.getKey();
           try {
               this.scheduler.addPeriodicJob(name, this.schedulerTarget,
  -                                  (long)expires,
  +                                  expires,
                                     true,
                                     conf.parameters,
                                     conf.map);
  
  
  
  1.2       +2 -3      cocoon-2.1/src/blocks/scratchpad/java/org/apache/cocoon/components/source/impl/UpdateTarget.java
  
  Index: UpdateTarget.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/scratchpad/java/org/apache/cocoon/components/source/impl/UpdateTarget.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- UpdateTarget.java	4 Sep 2003 12:42:34 -0000	1.1
  +++ UpdateTarget.java	24 Sep 2003 22:34:52 -0000	1.2
  @@ -56,7 +56,6 @@
   import java.util.Map;
   
   import org.apache.avalon.excalibur.pool.Recyclable;
  -import org.apache.avalon.framework.component.Component;
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
   import org.apache.avalon.framework.parameters.Parameters;
   import org.apache.avalon.framework.service.ServiceException;
  @@ -155,7 +154,7 @@
                       }
                       cachedResponse = (byte[])serializer.getSAXFragment();
                   } finally {
  -                    this.manager.release((Component)parser);
  +                    this.manager.release(parser);
                       this.manager.release(serializer);
                   }
                   
  
  
  
  1.5       +2 -22     cocoon-2.1/src/blocks/webdav/java/org/apache/cocoon/components/source/impl/WebDAVSourceFactory.java
  
  Index: WebDAVSourceFactory.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/webdav/java/org/apache/cocoon/components/source/impl/WebDAVSourceFactory.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- WebDAVSourceFactory.java	22 Aug 2003 12:23:41 -0000	1.4
  +++ WebDAVSourceFactory.java	24 Sep 2003 22:34:52 -0000	1.5
  @@ -54,9 +54,6 @@
   import java.net.MalformedURLException;
   import java.util.Map;
   
  -import org.apache.avalon.framework.component.Composable;
  -import org.apache.avalon.framework.component.ComponentException;
  -import org.apache.avalon.framework.component.ComponentManager;
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
   import org.apache.avalon.framework.thread.ThreadSafe;
   import org.apache.commons.httpclient.HttpURL;
  @@ -75,18 +72,7 @@
   */
   public class WebDAVSourceFactory
       extends AbstractLogEnabled
  -    implements SourceFactory, ThreadSafe, Composable {
  -
  -    /** The component manager instance */
  -    private ComponentManager manager = null;
  -
  -    /**
  -     * Set the current <code>ComponentManager</code> instance used by this
  -     * <code>Composable</code>.
  -     */
  -    public void compose(ComponentManager manager) throws ComponentException {
  -        this.manager = manager;
  -    }
  +    implements SourceFactory, ThreadSafe {
   
       /**
        * Get a <code>Source</code> object.
  @@ -117,12 +103,6 @@
           WebDAVSource source =
               WebDAVSource.newWebDAVSource(location, principal, password, protocol);
               
  -        try {
  -            source.compose(this.manager);
  -        } catch (ComponentException ce) {
  -            getLogger().error("Could not lookup for component.", ce);
  -        }
  -
           return source;
       }
   
  
  
  
  1.8       +4 -21     cocoon-2.1/src/blocks/webdav/java/org/apache/cocoon/components/source/impl/WebDAVSource.java
  
  Index: WebDAVSource.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/webdav/java/org/apache/cocoon/components/source/impl/WebDAVSource.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- WebDAVSource.java	27 Aug 2003 17:36:07 -0000	1.7
  +++ WebDAVSource.java	24 Sep 2003 22:34:52 -0000	1.8
  @@ -75,9 +75,6 @@
   import org.apache.cocoon.components.source.InspectableSource;
   import org.apache.cocoon.xml.XMLUtils;
   import org.apache.commons.httpclient.HttpException;
  -import org.apache.avalon.framework.component.Composable;
  -import org.apache.avalon.framework.component.ComponentManager;
  -import org.apache.avalon.framework.component.ComponentException;
   import org.apache.excalibur.source.ModifiableTraversableSource;
   import org.apache.excalibur.source.Source;
   import org.apache.excalibur.source.SourceException;
  @@ -107,7 +104,7 @@
    *  @author <a href="mailto:d.madama@pro-netics.com">Daniele Madama</a>
    *  @version $Id$
   */
  -public class WebDAVSource implements Composable, Source,
  +public class WebDAVSource implements Source,
       RestrictableSource, ModifiableTraversableSource, InspectableSource {
   
   
  @@ -119,8 +116,6 @@
   
       private final String COLLECTION_NAME = "collection";
   
  -    private ComponentManager manager = null;
  -
       private String systemId;
       
       private String location;
  @@ -212,18 +207,6 @@
       }
   
       /**
  -     * Pass the ComponentManager to the composer. The Composable implementation
  -     * should use the specified ComponentManager to acquire the components it needs for
execution
  -     *
  -     * @param manager The ComponentManager which this Composable uses
  -     *
  -     * @throws ComponentException
  -     */
  -    public void compose(ComponentManager manager) throws ComponentException {
  -        this.manager = manager;
  -    }
  -
  -    /**
        * Get the scheme for this Source (webdav://).
        */
   
  @@ -470,7 +453,7 @@
   
           private WebdavResource resource = null;
   
  -        private WebDAVSourceOutputStream(WebdavResource resource) {
  +        protected WebDAVSourceOutputStream(WebdavResource resource) {
               this.resource = resource;
               WebdavResource.setGetUseDisk(false);
           }
  @@ -807,7 +790,7 @@
               NodeList list = sourceproperty.getValue().getChildNodes();
               for (int i=0; i<list.getLength(); i++) {
                   if (list.item(i) instanceof Element)
  -                frag.appendChild((Element)list.item(i));
  +                    frag.appendChild(list.item(i));
               }
   
               Properties format = new Properties();
  
  
  
  1.3       +1 -5      cocoon-2.1/src/blocks/taglib/java/org/apache/cocoon/transformation/TagTransformer.java
  
  Index: TagTransformer.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/taglib/java/org/apache/cocoon/transformation/TagTransformer.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TagTransformer.java	16 Mar 2003 17:49:09 -0000	1.2
  +++ TagTransformer.java	24 Sep 2003 22:34:53 -0000	1.3
  @@ -114,8 +114,6 @@
       private SourceResolver resolver;
       /** The current objectModel of the environment */
       private Map objectModel;
  -    /** The source attribute specified in the sitemap */
  -    private String source;
       /** The parameters specified in the sitemap */
       private Parameters parameters;
       /** The Avalon ComponentManager */
  @@ -337,7 +335,6 @@
           skipLevel = 0;
           resolver = null;
           objectModel = null;
  -        source = null;
           parameters = null;
           currentTag = null;
           currentConsumer = null;
  @@ -399,7 +396,6 @@
           throws IOException, SAXException {
           this.resolver = resolver;
           this.objectModel = objectModel;
  -        this.source = source;
           this.parameters = parameters;
       }
   
  
  
  
  1.2       +3 -4      cocoon-2.1/src/blocks/scratchpad/java/org/apache/cocoon/generation/JellyGenerator.java
  
  Index: JellyGenerator.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/scratchpad/java/org/apache/cocoon/generation/JellyGenerator.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- JellyGenerator.java	4 Sep 2003 12:42:40 -0000	1.1
  +++ JellyGenerator.java	24 Sep 2003 22:34:53 -0000	1.2
  @@ -56,7 +56,6 @@
   import java.util.Enumeration;
   import java.util.Map;
   
  -import org.apache.avalon.framework.component.Component;
   import org.apache.avalon.framework.parameters.Parameters;
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.ResourceNotFoundException;
  @@ -141,7 +140,7 @@
               throw new ProcessingException("Exception in JellyGenerator.generate()", e);
           } finally {
               this.resolver.release( scriptSource );
  -            this.manager.release((Component)parser);
  +            this.manager.release(parser);
           }
       }
   
  @@ -153,7 +152,7 @@
               String pArray[] = params.getNames();
               for(int i=0; i<pArray.length; i++) {
                   String var = pArray[i];
  -                String val = (String) params.getParameter(var);
  +                String val = params.getParameter(var);
                   this.jellyContext.setVariable( var, val );
               }
           } catch (Exception e) {
  @@ -171,7 +170,7 @@
               Enumeration enum = request.getParameterNames();
               while (enum.hasMoreElements()) {
                   String var = (String) enum.nextElement();
  -                String val = (String) request.getParameter(var);
  +                String val = request.getParameter(var);
                   this.jellyContext.setVariable( var, val );
               }
           } catch (Exception e) {
  
  
  
  1.3       +9 -10     cocoon-2.1/src/blocks/scratchpad/java/org/apache/cocoon/generation/FlowVelocityGenerator.java
  
  Index: FlowVelocityGenerator.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/scratchpad/java/org/apache/cocoon/generation/FlowVelocityGenerator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FlowVelocityGenerator.java	5 Sep 2003 07:04:34 -0000	1.2
  +++ FlowVelocityGenerator.java	24 Sep 2003 22:34:53 -0000	1.3
  @@ -59,7 +59,6 @@
   import java.util.*;
   
   import org.apache.avalon.framework.activity.Initializable;
  -import org.apache.avalon.framework.component.Component;
   import org.apache.avalon.framework.component.ComponentException;
   import org.apache.avalon.framework.configuration.Configurable;
   import org.apache.avalon.framework.configuration.Configuration;
  @@ -83,9 +82,9 @@
   import org.apache.excalibur.source.Source;
   import org.apache.excalibur.xml.sax.SAXParser;
   import org.apache.velocity.VelocityContext;
  -import org.apache.velocity.app.Velocity;
   import org.apache.velocity.app.VelocityEngine;
   import org.apache.velocity.context.Context;
  +import org.apache.velocity.runtime.RuntimeConstants;
   import org.apache.velocity.runtime.RuntimeServices;
   import org.apache.velocity.runtime.log.LogSystem;
   import org.apache.velocity.util.introspection.Info;
  @@ -400,7 +399,7 @@
                       result = ScriptRuntime.call(cx, result, thisObj, 
                                                   newArgs, scope);
                       if (result == Undefined.instance ||
  -                        result == ScriptableObject.NOT_FOUND) {
  +                        result == Scriptable.NOT_FOUND) {
                           result = null;
                       } else while (result instanceof Wrapper) {
                           result = ((Wrapper)result).unwrap();
  @@ -448,7 +447,7 @@
                       }
                       Object result = ScriptableObject.getProperty(thisObj, name);
                       if (result == Undefined.instance || 
  -                        result == ScriptableObject.NOT_FOUND) {
  +                        result == Scriptable.NOT_FOUND) {
                           result = null;
                       } else while (result instanceof Wrapper) {
                           result = ((Wrapper)result).unwrap();
  @@ -531,7 +530,7 @@
                   try {
                       Object result = arr.get(index++, arr);
                       if (result == Undefined.instance ||
  -                        result == ScriptableObject.NOT_FOUND) {
  +                        result == Scriptable.NOT_FOUND) {
                           result = null;
                       } else while (result instanceof Wrapper) {
                           result = ((Wrapper)result).unwrap();
  @@ -570,7 +569,7 @@
                           ScriptableObject.getProperty(scope, 
                                                        ids[index++].toString());
                       if (result == Undefined.instance ||
  -                        result == ScriptableObject.NOT_FOUND) {
  +                        result == Scriptable.NOT_FOUND) {
                           result = null;
                       } else while (result instanceof Wrapper) {
                           result = ((Wrapper)result).unwrap();
  @@ -771,7 +770,7 @@
           // Set up a JavaScript introspector for the Cocoon flow layer
           this.tmplEngine.setProperty(org.apache.velocity.runtime.RuntimeConstants.UBERSPECT_CLASSNAME,
                                       JSIntrospector.class.getName());
  -        this.tmplEngine.setProperty(Velocity.RUNTIME_LOG_LOGSYSTEM, this);
  +        this.tmplEngine.setProperty(RuntimeConstants.RUNTIME_LOG_LOGSYSTEM, this);
   
           // First set up our default 'cocoon' resource loader
           this.tmplEngine.setProperty("cocoon.resource.loader.class",
  @@ -831,7 +830,7 @@
               buffer.append(',');
               buffer.append((String) it.next());
           }
  -        tmplEngine.setProperty(Velocity.RESOURCE_LOADER, buffer.toString());
  +        tmplEngine.setProperty(RuntimeConstants.RESOURCE_LOADER, buffer.toString());
       }
   
       /**
  @@ -1084,7 +1083,7 @@
               getLogger().error("Could not get parser", e);
               throw new ProcessingException("Exception in VelocityGenerator.generate()",
e);
           } finally {
  -            this.manager.release((Component) parser);
  +            this.manager.release(parser);
           }
       }
   
  
  
  
  1.3       +2 -3      cocoon-2.1/src/blocks/scratchpad/java/org/apache/cocoon/generation/RequestAttributeGenerator.java
  
  Index: RequestAttributeGenerator.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/scratchpad/java/org/apache/cocoon/generation/RequestAttributeGenerator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- RequestAttributeGenerator.java	5 Sep 2003 07:04:34 -0000	1.2
  +++ RequestAttributeGenerator.java	24 Sep 2003 22:34:53 -0000	1.3
  @@ -52,7 +52,6 @@
   
   import java.io.StringReader;
   
  -import org.apache.avalon.framework.component.Component;
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.environment.ObjectModelHelper;
   import org.apache.cocoon.environment.Request;
  @@ -148,7 +147,7 @@
               getLogger().error("Could not get parser", e);
               throw new ProcessingException("Exception in RequestAttributeGenerator.generate()",
e);
           } finally {
  -            this.manager.release((Component)parser);
  +            this.manager.release(parser);
           }
       }
   
  
  
  
  1.5       +5 -5      cocoon-2.1/src/blocks/slide/java/org/apache/cocoon/components/source/impl/GIFSourceInspector.java
  
  Index: GIFSourceInspector.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/slide/java/org/apache/cocoon/components/source/impl/GIFSourceInspector.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- GIFSourceInspector.java	5 Sep 2003 07:31:45 -0000	1.4
  +++ GIFSourceInspector.java	24 Sep 2003 22:34:53 -0000	1.5
  @@ -143,10 +143,10 @@
               || (buf[2]) != (byte)'F' )
               throw new SourceException("Not a valid GIF file!");
   
  -            int w1 = ((int)buf[6] & 0xff) | (buf[6] & 0x80);
  -            int w2 = ((int)buf[7] & 0xff) | (buf[7] & 0x80);
  -            int h1 = ((int)buf[8] & 0xff) | (buf[8] & 0x80);
  -            int h2 = ((int)buf[9] & 0xff) | (buf[9] & 0x80);
  +            int w1 = (buf[6] & 0xff) | (buf[6] & 0x80);
  +            int w2 = (buf[7] & 0xff) | (buf[7] & 0x80);
  +            int h1 = (buf[8] & 0xff) | (buf[8] & 0x80);
  +            int h2 = (buf[9] & 0xff) | (buf[9] & 0x80);
   
               int width = w1 + (w2 << 8);
               int height = h1 + (h2 << 8);
  
  
  
  1.8       +12 -12    cocoon-2.1/src/blocks/slide/java/org/apache/cocoon/components/source/impl/SlideSource.java
  
  Index: SlideSource.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/slide/java/org/apache/cocoon/components/source/impl/SlideSource.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- SlideSource.java	4 Aug 2003 03:06:30 -0000	1.7
  +++ SlideSource.java	24 Sep 2003 22:34:53 -0000	1.8
  @@ -120,22 +120,22 @@
                LockableSource, InspectableSource, VersionableSource {
   
       /** Component context */
  -    private Context context;
  +    protected Context context;
   
       /** Component manager */
       private ComponentManager manager;
   
       /** Namespace access token. */
  -    private NamespaceAccessToken nat;
  +    protected NamespaceAccessToken nat;
   
       /** Configuration of namespace */
  -    private NamespaceConfig config;
  +    protected NamespaceConfig config;
   
       /** Structure helper. */
  -    private Structure structure;
  +    protected Structure structure;
   
       /** Content helper. */
  -    private Content content;
  +    protected Content content;
   
       /** Security helper. */
       private Security security;
  @@ -149,22 +149,22 @@
       private CredentialsToken credToken;
   
       /** Slide token. */
  -    private SlideToken slideToken;
  +    protected SlideToken slideToken;
   
       /** Pseudo scheme */
       private String scheme = "slide";
   
       /** The path of the source, which means the URI without the scheme */
  -    private String path;
  +    protected String path;
   
       /** Uniform resource ifdentifier */
       private String uri;
   
       /** Revision number */
  -    private NodeRevisionNumber revisionNumber;
  +    protected NodeRevisionNumber revisionNumber;
   
  -    private NodeRevisionDescriptors revisionDescriptors = null;
  -    private NodeRevisionDescriptor revisionDescriptor = null;
  +    private NodeRevisionDescriptors revisionDescriptors;
  +    protected NodeRevisionDescriptor revisionDescriptor;
   
       // private String branch;
   
  @@ -1571,7 +1571,7 @@
   
               SourcePermission[] sourcepermissionArray = new SourcePermission[sourcepermissions.size()];
   
  -            return (SourcePermission[]) sourcepermissions.toArray((Object[]) sourcepermissionArray);
  +            return (SourcePermission[]) sourcepermissions.toArray(sourcepermissionArray);
   
           } catch (SlideException se) {
               throw new SourceException("Exception eccurs while retrieveing source permission",
  
  
  
  1.2       +1 -8      cocoon-2.1/src/blocks/scratchpad/java/org/apache/cocoon/reading/DirectoryZipArchiver.java
  
  Index: DirectoryZipArchiver.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/scratchpad/java/org/apache/cocoon/reading/DirectoryZipArchiver.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DirectoryZipArchiver.java	4 Sep 2003 12:42:44 -0000	1.1
  +++ DirectoryZipArchiver.java	24 Sep 2003 22:34:53 -0000	1.2
  @@ -54,9 +54,6 @@
   
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.ResourceNotFoundException;
  -import org.apache.cocoon.environment.ObjectModelHelper;
  -import org.apache.cocoon.environment.Request;
  -import org.apache.cocoon.environment.Response;
   import org.apache.cocoon.environment.SourceResolver;
   
   import org.apache.excalibur.source.Source;
  @@ -87,16 +84,12 @@
   public class DirectoryZipArchiver extends AbstractReader {
   
       private Source inputSource;
  -    private Response response;
  -    private Request request;
   
       private File directory;
   
       public void setup(SourceResolver resolver, Map objectModel, String src, Parameters
par)
           throws ProcessingException, SAXException, IOException {
           super.setup(resolver, objectModel, src, par);
  -        this.request = ObjectModelHelper.getRequest(objectModel);
  -        this.response = ObjectModelHelper.getResponse(objectModel);
   
           try {
               this.inputSource = this.resolver.resolveURI(super.source);
  
  
  
  1.4       +3 -3      cocoon-2.1/src/blocks/slide/java/org/apache/cocoon/components/repository/impl/SlidePrincipalProvider.java
  
  Index: SlidePrincipalProvider.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/slide/java/org/apache/cocoon/components/repository/impl/SlidePrincipalProvider.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SlidePrincipalProvider.java	24 Mar 2003 14:33:57 -0000	1.3
  +++ SlidePrincipalProvider.java	24 Sep 2003 22:34:53 -0000	1.4
  @@ -121,7 +121,7 @@
       // private Lock lock;
   
       /** Macro helper. */
  -    private Macro macro;
  +    // private Macro macro;
   
       /** Slide token. */
       // private SlideToken slidetoken;
  @@ -188,7 +188,7 @@
               this.content = nat.getContentHelper();
               this.security = nat.getSecurityHelper();
               // this.lock = nat.getLockHelper();
  -            this.macro = nat.getMacroHelper();
  +            // this.macro = nat.getMacroHelper();
   
           } catch (ComponentException ce) {
               getLogger().error("Could not lookup for component.", ce);
  
  
  
  1.3       +3 -3      cocoon-2.1/src/deprecated/java/org/apache/cocoon/components/source/FileSource.java
  
  Index: FileSource.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/deprecated/java/org/apache/cocoon/components/source/FileSource.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FileSource.java	16 Mar 2003 17:49:10 -0000	1.2
  +++ FileSource.java	24 Sep 2003 22:34:53 -0000	1.3
  @@ -73,10 +73,10 @@
       implements org.apache.cocoon.environment.WriteableSource {
   
       /** The underlying file. */
  -    private File file;
  +    protected File file;
   
       /** The system ID for this source (lazily created by getSystemId()) */
  -    private String systemId = null;
  +    private String systemId;
   
       /** Is this an html file ? */
       private boolean isHTMLContent;
  
  
  
  1.10      +8 -8      cocoon-2.1/src/blocks/velocity/java/org/apache/cocoon/generation/VelocityGenerator.java
  
  Index: VelocityGenerator.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/velocity/java/org/apache/cocoon/generation/VelocityGenerator.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- VelocityGenerator.java	5 Sep 2003 07:40:21 -0000	1.9
  +++ VelocityGenerator.java	24 Sep 2003 22:34:53 -0000	1.10
  @@ -82,9 +82,9 @@
   import org.apache.excalibur.source.Source;
   import org.apache.excalibur.xml.sax.SAXParser;
   import org.apache.velocity.VelocityContext;
  -import org.apache.velocity.app.Velocity;
   import org.apache.velocity.app.VelocityEngine;
   import org.apache.velocity.context.Context;
  +import org.apache.velocity.runtime.RuntimeConstants;
   import org.apache.velocity.runtime.RuntimeServices;
   import org.apache.velocity.runtime.log.LogSystem;
   import org.apache.velocity.util.introspection.Info;
  @@ -399,7 +399,7 @@
                       result = ScriptRuntime.call(cx, result, thisObj, 
                                                   newArgs, scope);
                       if (result == Undefined.instance ||
  -                        result == ScriptableObject.NOT_FOUND) {
  +                        result == Scriptable.NOT_FOUND) {
                           result = null;
                       } else while (result instanceof Wrapper) {
                           result = ((Wrapper)result).unwrap();
  @@ -447,7 +447,7 @@
                       }
                       Object result = ScriptableObject.getProperty(thisObj, name);
                       if (result == Undefined.instance || 
  -                        result == ScriptableObject.NOT_FOUND) {
  +                        result == Scriptable.NOT_FOUND) {
                           result = null;
                       } else while (result instanceof Wrapper) {
                           result = ((Wrapper)result).unwrap();
  @@ -530,7 +530,7 @@
                   try {
                       Object result = arr.get(index++, arr);
                       if (result == Undefined.instance ||
  -                        result == ScriptableObject.NOT_FOUND) {
  +                        result == Scriptable.NOT_FOUND) {
                           result = null;
                       } else while (result instanceof Wrapper) {
                           result = ((Wrapper)result).unwrap();
  @@ -569,7 +569,7 @@
                           ScriptableObject.getProperty(scope, 
                                                        ids[index++].toString());
                       if (result == Undefined.instance ||
  -                        result == ScriptableObject.NOT_FOUND) {
  +                        result == Scriptable.NOT_FOUND) {
                           result = null;
                       } else while (result instanceof Wrapper) {
                           result = ((Wrapper)result).unwrap();
  @@ -770,7 +770,7 @@
           // Set up a JavaScript introspector for the Cocoon flow layer
           this.tmplEngine.setProperty(org.apache.velocity.runtime.RuntimeConstants.UBERSPECT_CLASSNAME,
                                       JSIntrospector.class.getName());
  -        this.tmplEngine.setProperty(Velocity.RUNTIME_LOG_LOGSYSTEM, this);
  +        this.tmplEngine.setProperty(RuntimeConstants.RUNTIME_LOG_LOGSYSTEM, this);
   
           // First set up our default 'cocoon' resource loader
           this.tmplEngine.setProperty("cocoon.resource.loader.class",
  @@ -830,7 +830,7 @@
               buffer.append(',');
               buffer.append((String) it.next());
           }
  -        tmplEngine.setProperty(Velocity.RESOURCE_LOADER, buffer.toString());
  +        tmplEngine.setProperty(RuntimeConstants.RESOURCE_LOADER, buffer.toString());
       }
   
       /**
  
  
  
  1.5       +2 -2      cocoon-2.1/src/blocks/mail/java/org/apache/cocoon/mail/MailMessageSender.java
  
  Index: MailMessageSender.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/mail/java/org/apache/cocoon/mail/MailMessageSender.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- MailMessageSender.java	3 Jul 2003 11:36:10 -0000	1.4
  +++ MailMessageSender.java	24 Sep 2003 22:34:53 -0000	1.5
  @@ -110,7 +110,7 @@
           private Object obj = null;
           private String type = null;
           private String name = null;
  -        private boolean isURL = false;
  +        protected boolean isURL = false;
   
           /**
            * Create a new attachment object encapsulating obj.
  
  
  

Mime
View raw message