cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rica...@locus.apache.org
Subject cvs commit: xml-cocoon/src/org/apache/cocoon/components/language/programming CompiledProgrammingLanguage.java
Date Wed, 24 May 2000 21:26:03 GMT
ricardo     00/05/24 14:26:01

  Modified:    src/org/apache/cocoon/components/language/generator Tag:
                        xml-cocoon2 ProgramGeneratorImpl.java
               src/org/apache/cocoon/components/language/programming Tag:
                        xml-cocoon2 CompiledProgrammingLanguage.java
  Log:
  Fixed a bug resulting in unnecessary recompilation
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.3   +10 -7     xml-cocoon/src/org/apache/cocoon/components/language/generator/Attic/ProgramGeneratorImpl.java
  
  Index: ProgramGeneratorImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/components/language/generator/Attic/ProgramGeneratorImpl.java,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- ProgramGeneratorImpl.java	2000/05/24 21:00:32	1.1.2.2
  +++ ProgramGeneratorImpl.java	2000/05/24 21:25:54	1.1.2.3
  @@ -50,7 +50,7 @@
    * The default implementation of <code>ProgramGenerator</code>
    *
    * @author <a href="mailto:ricardo@apache.org">Ricardo Rocha</a>
  - * @version CVS $Revision: 1.1.2.2 $ $Date: 2000/05/24 21:00:32 $
  + * @version CVS $Revision: 1.1.2.3 $ $Date: 2000/05/24 21:25:54 $
    */
   public class ProgramGeneratorImpl
     implements ProgramGenerator, Composer, Configurable
  @@ -140,18 +140,21 @@
     
         try {
           if (program == null) {
  -          // FIXME: Why pass null as encoding?
  +          /*
  +	     FIXME: Passing null as encoding may result in invalid
  +	     recompilation under certain circumstances!
  +	  */
             program = programmingLanguage.load(
               normalizedName, this.repositoryName, null
             );
     
  -	  // Instantiate program
  -          programInstance = programmingLanguage.instantiate(program);
  +          // Store loaded program in cache
  +          this.cache.store(filename, program);
   	}
   
  -        // Store loaded program in cache
  -        this.cache.store(filename, program);
  -      } catch (LanguageException e) {}
  +	// Instantiate program
  +        programInstance = programmingLanguage.instantiate(program);
  +      } catch (LanguageException e) { }
         
         /*
            FIXME: It's the program (not the instance) that must
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.2   +3 -2      xml-cocoon/src/org/apache/cocoon/components/language/programming/Attic/CompiledProgrammingLanguage.java
  
  Index: CompiledProgrammingLanguage.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/components/language/programming/Attic/CompiledProgrammingLanguage.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- CompiledProgrammingLanguage.java	2000/05/23 23:10:02	1.1.2.1
  +++ CompiledProgrammingLanguage.java	2000/05/24 21:25:59	1.1.2.2
  @@ -23,7 +23,7 @@
    * and object program files
    *
    * @author <a href="mailto:ricardo@apache.org">Ricardo Rocha</a>
  - * @version CVS $Revision: 1.1.2.1 $ $Date: 2000/05/23 23:10:02 $
  + * @version CVS $Revision: 1.1.2.2 $ $Date: 2000/05/24 21:25:59 $
    */
   public abstract class CompiledProgrammingLanguage
     extends AbstractProgrammingLanguage
  @@ -150,7 +150,8 @@
   
       // Does object file exist? Load and return instance
       File objectFile = new File(
  -      baseDirectory + File.separator + filename + this.getObjectExtension()
  +      baseDirectory + File.separator +
  +      filename + "." + this.getObjectExtension()
       );
   
       if (objectFile.exists() && objectFile.isFile() && objectFile.canRead())
{
  
  
  

Mime
View raw message