User: vharcq  
  Date: 02/03/22 15:30:30

  Modified:    core/src/xdoclet Tag: XJAVADOC_REFACTORING
                        TemplateSubTask.java
  Log:
  static when possible
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.29.2.6  +11 -9     xdoclet/core/src/xdoclet/TemplateSubTask.java
  
  Index: TemplateSubTask.java
  ===================================================================
  RCS file: /cvsroot/xdoclet/xdoclet/core/src/xdoclet/TemplateSubTask.java,v
  retrieving revision 1.29.2.5
  retrieving revision 1.29.2.6
  diff -u -w -r1.29.2.5 -r1.29.2.6
  --- TemplateSubTask.java      21 Mar 2002 16:55:55 -0000      1.29.2.5
  +++ TemplateSubTask.java      22 Mar 2002 23:30:30 -0000      1.29.2.6
  @@ -29,7 +29,7 @@
    *
    * @author    Ara Abrahamian ([EMAIL PROTECTED])
    * @created   Sep 25, 2001
  - * @version   $Revision: 1.29.2.5 $
  + * @version   $Revision: 1.29.2.6 $
    */
   public class TemplateSubTask extends SubTask
   {
  @@ -97,6 +97,10 @@
   
        private boolean    guessGenerationNeeded = true;
   
  +    private static           File xdocletJar = getXdocletJar();
  +
  +
  +
        /**
         * Converts the full qualified class name to a valid path with File.separator
         * characters instead of . characters and class name postfixed by a ".java".
  @@ -581,17 +585,17 @@
        {
                Category cat = Log.getCategory( TemplateSubTask.class, "generation" );
   
  -             if( isGuessGenerationNeeded() == false )
  +        if( getContext().isForce() )
                {
                        if( cat.isDebugEnabled() )
  -                             cat.debug( "guessGenerationNeeded enabled" );
  +                             cat.debug( "Force generation enabled" );
                        return true;
                }
   
  -             if( getContext().isForce() )
  +             if( isGuessGenerationNeeded() == false )
                {
                        if( cat.isDebugEnabled() )
  -                             cat.debug( "Force generation enabled" );
  +                             cat.debug( "guessGenerationNeeded enabled" );
                        return true;
                }
   
  @@ -665,8 +669,6 @@
                        cat.debug( "Generation need check for " + file.getName() );
   
                // 1. Check the classpath for timestamp on XDOCLET JAR
  -             File xdocletJar = getXdocletJar();
  -
                if( file.lastModified() < xdocletJar.lastModified() )
                {
                        if( cat.isDebugEnabled() )
  @@ -764,9 +766,9 @@
                return false;
        }
   
  -     private File getXdocletJar()
  +     private static File getXdocletJar()
        {
  -             String path_str = 
this.getClass().getProtectionDomain().getCodeSource().getLocation().getFile().toString();
  +             String path_str = 
TemplateSubTask.class.getProtectionDomain().getCodeSource().getLocation().getFile().toString();
   
                if( path_str != null && path_str.startsWith( "/" ) )
                {
  
  
  

_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to