[jboss-cvs] jboss-portal/common/src/main/org/jboss/portal/common/ant ...

Boleslaw Dawidowicz bdaw at o2.pl
Wed Jul 26 13:29:38 EDT 2006


  User: bdaw    
  Date: 06/07/26 13:29:38

  Modified:    common/src/main/org/jboss/portal/common/ant  Implode.java
  Log:
  correct conditions for ant "implode" task
  
  Revision  Changes    Path
  1.2       +24 -23    jboss-portal/common/src/main/org/jboss/portal/common/ant/Implode.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: Implode.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-portal/common/src/main/org/jboss/portal/common/ant/Implode.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- Implode.java	28 Jun 2006 00:48:21 -0000	1.1
  +++ Implode.java	26 Jul 2006 17:29:38 -0000	1.2
  @@ -37,7 +37,7 @@
   
   /**
    * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    */
   public class Implode extends Task
   {
  @@ -89,8 +89,9 @@
         {
            throw new BuildException("target file " + tofile + " designates a directory");
         }
  -      if (tofile == null || tofile.lastModified() < dir.lastModified())
  -      {
  +      //if (tofile == null || tofile.lastModified() < dir.lastModified())
  +
  +
            FileOutputStream out = null;
            try
            {
  @@ -98,7 +99,7 @@
               out = new FileOutputStream(tofile);
               out.write(bytes);
            }
  -         catch(IOException e)
  +      catch (IOException e)
            {
               e.printStackTrace();
               throw new BuildException(e.getMessage());
  @@ -116,7 +117,7 @@
                  }
               }
            }
  -      }
  +
      }
   
      public byte[] implode(File f) throws IOException
  @@ -144,7 +145,7 @@
               out.putNextEntry(fileEntry);
   
               //
  -            for (int l = in.read(bytes, 0, bytes.length);l >- 0;l = in.read(bytes, 0, bytes.length))
  +            for (int l = in.read(bytes, 0, bytes.length); l > - 0; l = in.read(bytes, 0, bytes.length))
               {
                  out.write(bytes, 0, l);
               }
  
  
  



More information about the jboss-cvs-commits mailing list