cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgritse...@apache.org
Subject cvs commit: xml-cocoon2/src/java/org/apache/cocoon/caching IncludeCacheValidity.java
Date Fri, 25 Jan 2002 03:35:53 GMT
vgritsenko    02/01/24 19:35:53

  Modified:    src/java/org/apache/cocoon/acting ScriptAction.java
               src/java/org/apache/cocoon/caching IncludeCacheValidity.java
  Log:
  Always recycle sources.
  
  Revision  Changes    Path
  1.3       +1 -4      xml-cocoon2/src/java/org/apache/cocoon/acting/ScriptAction.java
  
  Index: ScriptAction.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/acting/ScriptAction.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ScriptAction.java	22 Jan 2002 00:17:11 -0000	1.2
  +++ ScriptAction.java	25 Jan 2002 03:35:52 -0000	1.3
  @@ -32,7 +32,7 @@
    * A simple action that executes any script that can be run by the BSF
    *
    * @author <a href="mailto:jafoster@uwaterloo.ca">Jason Foster</a>
  - * @version CVS $Revision: 1.2 $ $Date: 2002/01/22 00:17:11 $
  + * @version CVS $Revision: 1.3 $ $Date: 2002/01/25 03:35:52 $
    */
   
   public class ScriptAction
  @@ -50,12 +50,9 @@
           try {
               // Figure out what script to open.  A missing script name is caught
               // by the resolver/SystemId grouping later on and causes an exception
  -
               String scriptName = source;
   
  -
               // Locate the appropriate file on the filesytem
  -
               src = resolver.resolve(scriptName);
               String systemID = src.getSystemId();
   
  
  
  
  1.2       +6 -1      xml-cocoon2/src/java/org/apache/cocoon/caching/IncludeCacheValidity.java
  
  Index: IncludeCacheValidity.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/caching/IncludeCacheValidity.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- IncludeCacheValidity.java	3 Jan 2002 12:31:08 -0000	1.1
  +++ IncludeCacheValidity.java	25 Jan 2002 03:35:53 -0000	1.2
  @@ -7,6 +7,7 @@
    *****************************************************************************/
   package org.apache.cocoon.caching;
   
  +import org.apache.cocoon.environment.Source;
   import org.apache.cocoon.environment.SourceResolver;
   
   import java.util.ArrayList;
  @@ -56,12 +57,16 @@
               for(Iterator i = sources.iterator(), j = timeStamps.iterator(); i.hasNext();)
{
                   String src = ((String)i.next());
                   long timeStamp = ((Long)j.next()).longValue();
  +                Source otherSource = null;
                   try {
  -                    if( otherResolver.resolve(src).getLastModified() != timeStamp ||
  +                    otherSource = otherResolver.resolve(src);
  +                    if(otherSource.getLastModified() != timeStamp ||
                           timeStamp == 0)
                           return false;
                   } catch (Exception e) {
                       return false;
  +                } finally {
  +                    if (otherSource != null) otherSource.recycle();
                   }
               }
               return true;
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message