ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@locus.apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs FixCRLF.java
Date Tue, 11 Jul 2000 12:00:09 GMT
bodewig     00/07/11 05:00:09

  Modified:    src/main/org/apache/tools/ant/taskdefs FixCRLF.java
  Log:
  Only ensured tablength was even, not it was a power of 2.
  
  Good to know others read my patches.
  
  Submitted by:	Sam Ruby <rubys@us.ibm.com>,
                  Fergus Gallagher <Fergus.Gallagher@OrbisUK.com>
  
  Revision  Changes    Path
  1.9       +1 -1      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/FixCRLF.java
  
  Index: FixCRLF.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/FixCRLF.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- FixCRLF.java	2000/07/11 11:28:26	1.8
  +++ FixCRLF.java	2000/07/11 12:00:08	1.9
  @@ -179,7 +179,7 @@
        * @param tlength specify the length of tab in spaces, has to be a power of 2
        */
       public void setTablength(int tlength) throws BuildException {
  -        if (tlength < 2 || (tlength % 2) != 0) {
  +        if (tlength < 2 || (tlength & (tlength-1)) == 0) {
               throw new BuildException("tablength must be a positive power of 2",
                                        location);
           }
  
  
  

Mime
View raw message