PR: 23919 Submitted by: Martijn Kruithof (ant at kruithof dot xs4all dot nl) git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@275557 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -77,7 +77,7 @@ import org.apache.tools.ant.types.Parameter; | |||||
| * | * | ||||
| * @since 1.6 | * @since 1.6 | ||||
| * @version 2003-09-23 | * @version 2003-09-23 | ||||
| * @author Jan Matèrne | |||||
| * @author Jan Mat\u00e8rne | |||||
| */ | */ | ||||
| public final class ConcatFilter extends BaseParamFilterReader | public final class ConcatFilter extends BaseParamFilterReader | ||||
| implements ChainableReader { | implements ChainableReader { | ||||
| @@ -148,7 +148,7 @@ public final class ConcatFilter extends BaseParamFilterReader | |||||
| ch = super.read(); | ch = super.read(); | ||||
| } | } | ||||
| if (ch == -1) { | if (ch == -1) { | ||||
| // don´t call super.close() because that reader is used | |||||
| // don't call super.close() because that reader is used | |||||
| // on other places ... | // on other places ... | ||||
| if (appendReader != null) { | if (appendReader != null) { | ||||
| ch = appendReader.read(); | ch = appendReader.read(); | ||||
| @@ -249,4 +249,4 @@ public final class ConcatFilter extends BaseParamFilterReader | |||||
| appendReader = new BufferedReader(new FileReader(append)); | appendReader = new BufferedReader(new FileReader(append)); | ||||
| } | } | ||||
| } | } | ||||
| } | |||||
| } | |||||
| @@ -87,7 +87,7 @@ import org.apache.tools.ant.types.Reference; | |||||
| * <p/> | * <p/> | ||||
| * Thanks to Rainer Schmitz for enhancements and comments. | * Thanks to Rainer Schmitz for enhancements and comments. | ||||
| * | * | ||||
| * @author <a href="mailto:aslak.hellesoy@bekk.no">Aslak Helles�a> | |||||
| * @author <a href="mailto:aslak.hellesoy@bekk.no">Aslak Helles\u00f8y</a> | |||||
| * | * | ||||
| * <p/> | * <p/> | ||||
| * <table border="1" cellpadding="2" cellspacing="0"> | * <table border="1" cellpadding="2" cellspacing="0"> | ||||
| @@ -64,7 +64,7 @@ import java.io.File; | |||||
| * same value. | * same value. | ||||
| * The implementing class should implement a useful toString() method. | * The implementing class should implement a useful toString() method. | ||||
| * | * | ||||
| * @author Jan Matèrne | |||||
| * @author Jan Mat\u00e8rne | |||||
| * @version 2003-09-13 | * @version 2003-09-13 | ||||
| * @since Ant 1.6 | * @since Ant 1.6 | ||||
| */ | */ | ||||
| @@ -82,4 +82,4 @@ public interface Algorithm { | |||||
| * @return The value for that file | * @return The value for that file | ||||
| */ | */ | ||||
| String getValue(File file); | String getValue(File file); | ||||
| } | |||||
| } | |||||
| @@ -66,7 +66,7 @@ import java.util.Iterator; | |||||
| * <i>order</i>. | * <i>order</i>. | ||||
| * The implementing class should implement a useful toString() method. | * The implementing class should implement a useful toString() method. | ||||
| * | * | ||||
| * @author Jan Matèrne | |||||
| * @author Jan Mat\u00e8rne | |||||
| * @version 2003-09-13 | * @version 2003-09-13 | ||||
| * @since Ant 1.6 | * @since Ant 1.6 | ||||
| */ | */ | ||||
| @@ -106,4 +106,4 @@ public interface Cache { | |||||
| * @return An iterator over the keys. | * @return An iterator over the keys. | ||||
| */ | */ | ||||
| Iterator iterator(); | Iterator iterator(); | ||||
| } | |||||
| } | |||||
| @@ -68,7 +68,7 @@ import org.apache.tools.ant.BuildException; | |||||
| /** | /** | ||||
| * Computes a 'hashvalue' for the content of file using | * Computes a 'hashvalue' for the content of file using | ||||
| * java.security.MessageDigest. | * java.security.MessageDigest. | ||||
| * Use of this algorithm doesn´t require any additional nested <param>s. | |||||
| * Use of this algorithm doesn't require any additional nested <param>s. | |||||
| * Supported <param>s are: | * Supported <param>s are: | ||||
| * <table> | * <table> | ||||
| * <tr> | * <tr> | ||||
| @@ -88,7 +88,7 @@ import org.apache.tools.ant.BuildException; | |||||
| * </tr> | * </tr> | ||||
| * </table> | * </table> | ||||
| * | * | ||||
| * @author Jan Matèrne | |||||
| * @author Jan Mat\u00e8rne | |||||
| * @version 2003-09-13 | * @version 2003-09-13 | ||||
| * @since Ant 1.6 | * @since Ant 1.6 | ||||
| */ | */ | ||||
| @@ -170,8 +170,8 @@ public class DigestAlgorithm implements Algorithm { | |||||
| /** | /** | ||||
| * This algorithm doesn´t need any configuration. | |||||
| * Therefore it´s always valid. | |||||
| * This algorithm doesn't need any configuration. | |||||
| * Therefore it's always valid. | |||||
| * @return <i>true</i> if all is ok, otherwise <i>false</i>. | * @return <i>true</i> if all is ok, otherwise <i>false</i>. | ||||
| */ | */ | ||||
| public boolean isValid() { | public boolean isValid() { | ||||
| @@ -238,4 +238,4 @@ public class DigestAlgorithm implements Algorithm { | |||||
| buf.append(">"); | buf.append(">"); | ||||
| return buf.toString(); | return buf.toString(); | ||||
| } | } | ||||
| } | |||||
| } | |||||
| @@ -63,7 +63,7 @@ import java.util.Comparator; | |||||
| * compare() returns '0' (should not be selected) if both parameter | * compare() returns '0' (should not be selected) if both parameter | ||||
| * are equal otherwise '1' (should be selected). | * are equal otherwise '1' (should be selected). | ||||
| * | * | ||||
| * @author Jan Matèrne | |||||
| * @author Jan Mat\u00e8rne | |||||
| * @version 2003-09-13 | * @version 2003-09-13 | ||||
| * @since Ant 1.6 | * @since Ant 1.6 | ||||
| */ | */ | ||||
| @@ -94,4 +94,4 @@ public class EqualComparator implements Comparator { | |||||
| public String toString() { | public String toString() { | ||||
| return "EqualComparator"; | return "EqualComparator"; | ||||
| } | } | ||||
| } | |||||
| } | |||||
| @@ -60,18 +60,18 @@ import java.io.File; | |||||
| /** | /** | ||||
| * Computes a 'hashvalue' for the content of file using String.hashValue(). | * Computes a 'hashvalue' for the content of file using String.hashValue(). | ||||
| * Use of this algorithm doesn´t require any additional nested <param>s and | |||||
| * doesn´t support any. | |||||
| * Use of this algorithm doesn't require any additional nested <param>s and | |||||
| * doesn't support any. | |||||
| * | * | ||||
| * @author Jan Matèrne | |||||
| * @author Jan Mat\u00e8rne | |||||
| * @version 2003-09-13 | * @version 2003-09-13 | ||||
| * @since Ant 1.6 | * @since Ant 1.6 | ||||
| */ | */ | ||||
| public class HashvalueAlgorithm implements Algorithm { | public class HashvalueAlgorithm implements Algorithm { | ||||
| /** | /** | ||||
| * This algorithm doesn´t need any configuration. | |||||
| * Therefore it´s always valid. | |||||
| * This algorithm doesn't need any configuration. | |||||
| * Therefore it's always valid. | |||||
| * @return always true | * @return always true | ||||
| */ | */ | ||||
| public boolean isValid() { | public boolean isValid() { | ||||
| @@ -83,7 +83,7 @@ public class HashvalueAlgorithm implements Algorithm { | |||||
| * It reads the content of a file, convert that to String and use the | * It reads the content of a file, convert that to String and use the | ||||
| * String.hashCode() method. | * String.hashCode() method. | ||||
| * @param file The file for which the value should be computed | * @param file The file for which the value should be computed | ||||
| * @return the hashvalue or <i>null</i> if the file couldn´t be read | |||||
| * @return the hashvalue or <i>null</i> if the file couldn't be read | |||||
| */ | */ | ||||
| // Because the content is only read the file will not be damaged. I tested | // Because the content is only read the file will not be damaged. I tested | ||||
| // with JPG, ZIP and PDF as binary files. | // with JPG, ZIP and PDF as binary files. | ||||
| @@ -113,4 +113,4 @@ public class HashvalueAlgorithm implements Algorithm { | |||||
| return "HashvalueAlgorithm"; | return "HashvalueAlgorithm"; | ||||
| } | } | ||||
| } | |||||
| } | |||||
| @@ -146,7 +146,7 @@ import org.apache.tools.ant.types.selectors.BaseExtendSelector; | |||||
| * </pre> Here all <b>changed</b> files are uploaded to the server. The | * </pre> Here all <b>changed</b> files are uploaded to the server. The | ||||
| * ModifiedSelector saves therefore much upload time.</p> | * ModifiedSelector saves therefore much upload time.</p> | ||||
| * | * | ||||
| * <p>This selector supports the following nested param´s: | |||||
| * <p>This selector supports the following nested param's: | |||||
| * <table> | * <table> | ||||
| * <tr><th>name</th><th>values</th><th>description</th><th>required</th></tr> | * <tr><th>name</th><th>values</th><th>description</th><th>required</th></tr> | ||||
| * <tr> | * <tr> | ||||
| @@ -219,7 +219,7 @@ import org.apache.tools.ant.types.selectors.BaseExtendSelector; | |||||
| * a nested <i><param name="algorithm.provider" value="MyProvider"/></i>. | * a nested <i><param name="algorithm.provider" value="MyProvider"/></i>. | ||||
| * | * | ||||
| * | * | ||||
| * @author Jan Matèrne | |||||
| * @author Jan Mat\u00e8rne | |||||
| * @version 2003-09-13 | * @version 2003-09-13 | ||||
| * @since Ant 1.6 | * @since Ant 1.6 | ||||
| */ | */ | ||||
| @@ -313,7 +313,7 @@ public class ModifiedSelector extends BaseExtendSelector { | |||||
| * <li> set values for name pattern '*': update, cache, algorithm, comparator </li> | * <li> set values for name pattern '*': update, cache, algorithm, comparator </li> | ||||
| * <li> set values for name pattern '*.*: cache.cachefile, ... </li> | * <li> set values for name pattern '*.*: cache.cachefile, ... </li> | ||||
| * </ol></p> | * </ol></p> | ||||
| * <p>This configuration algorithm is needed because you don´t know | |||||
| * <p>This configuration algorithm is needed because you don't know | |||||
| * the order of arriving config-data. E.g. if you first set the | * the order of arriving config-data. E.g. if you first set the | ||||
| * <i>cache.cachefilename</i> and after that the <i>cache</i> itself, | * <i>cache.cachefilename</i> and after that the <i>cache</i> itself, | ||||
| * the default value for cachefilename is used, because setting the | * the default value for cachefilename is used, because setting the | ||||
| @@ -650,4 +650,4 @@ public class ModifiedSelector extends BaseExtendSelector { | |||||
| } | } | ||||
| } | } | ||||
| } | |||||
| } | |||||
| @@ -88,7 +88,7 @@ import java.io.FileOutputStream; | |||||
| * </tr> | * </tr> | ||||
| * </table> | * </table> | ||||
| * | * | ||||
| * @author Jan Matèrne | |||||
| * @author Jan Mat\u00e8rne | |||||
| * @version 2003-09-13 | * @version 2003-09-13 | ||||
| * @since Ant 1.6 | * @since Ant 1.6 | ||||
| */ | */ | ||||
| @@ -252,4 +252,4 @@ public class PropertiesfileCache implements Cache { | |||||
| buf.append(">"); | buf.append(">"); | ||||
| return buf.toString(); | return buf.toString(); | ||||
| } | } | ||||
| } | |||||
| } | |||||
| @@ -62,7 +62,7 @@ import org.apache.tools.ant.util.FileUtils; | |||||
| /** | /** | ||||
| * JUnit Testcases for ConcatReader | * JUnit Testcases for ConcatReader | ||||
| * @author Jan Matèrne | |||||
| * @author Jan Mat\u00e8rne | |||||
| */ | */ | ||||
| public class ConcatFilterTest extends BuildFileTest { | public class ConcatFilterTest extends BuildFileTest { | ||||
| @@ -187,4 +187,4 @@ public class ConcatFilterTest extends BuildFileTest { | |||||
| return content; | return content; | ||||
| } | } | ||||
| } | |||||
| } | |||||
| @@ -185,7 +185,7 @@ public abstract class BaseSelectorTest extends TestCase { | |||||
| /** | /** | ||||
| * Does the selection test for a given selector and prints the | * Does the selection test for a given selector and prints the | ||||
| * filenames of the differing files (selected but shouldn´t, | |||||
| * filenames of the differing files (selected but shouldn't, | |||||
| * not selected but should). | * not selected but should). | ||||
| * @param selector The selector to test | * @param selector The selector to test | ||||
| * @param expected The expected result | * @param expected The expected result | ||||
| @@ -198,7 +198,7 @@ public abstract class BaseSelectorTest extends TestCase { | |||||
| } | } | ||||
| /** | /** | ||||
| * Checks which files are selected and shouldn´t be or which | |||||
| * Checks which files are selected and shouldn't be or which | |||||
| * are not selected but should. | * are not selected but should. | ||||
| * @param expected String containing 'F's and 'T's | * @param expected String containing 'F's and 'T's | ||||
| * @param result String containing 'F's and 'T's | * @param result String containing 'F's and 'T's | ||||
| @@ -324,4 +324,4 @@ public abstract class BaseSelectorTest extends TestCase { | |||||
| } | |||||
| } | |||||
| @@ -73,7 +73,7 @@ import org.apache.tools.ant.types.selectors.modifiedselector.*; | |||||
| /** | /** | ||||
| * Unit tests for ModifiedSelector. | * Unit tests for ModifiedSelector. | ||||
| * | * | ||||
| * @author Jan Matèrne | |||||
| * @author Jan Mat\u00e8rne | |||||
| * @version 2003-09-13 | * @version 2003-09-13 | ||||
| * @since Ant 1.6 | * @since Ant 1.6 | ||||
| */ | */ | ||||
| @@ -261,7 +261,7 @@ public class ModifiedSelectorTest extends BaseSelectorTest { | |||||
| for (int i=0; i<filenames.length; i++) { | for (int i=0; i<filenames.length; i++) { | ||||
| String ch = "F"; | String ch = "F"; | ||||
| if (files[i].isDirectory()) ch = "T"; | if (files[i].isDirectory()) ch = "T"; | ||||
| // f2name shouldn´t be selected: only timestamp has changed! | |||||
| // f2name shouldn't be selected: only timestamp has changed! | |||||
| if (filenames[i].equalsIgnoreCase(f3name)) ch = "T"; | if (filenames[i].equalsIgnoreCase(f3name)) ch = "T"; | ||||
| if (filenames[i].equalsIgnoreCase(f4name)) ch = "T"; | if (filenames[i].equalsIgnoreCase(f4name)) ch = "T"; | ||||
| expected.append(ch); | expected.append(ch); | ||||
| @@ -304,7 +304,7 @@ public class ModifiedSelectorTest extends BaseSelectorTest { | |||||
| s.setClassname("org.apache.tools.ant.types.selectors.modifiedselector.ModifiedSelector"); | s.setClassname("org.apache.tools.ant.types.selectors.modifiedselector.ModifiedSelector"); | ||||
| s.addParam(createParam("cache.cachefile", cachefile)); | s.addParam(createParam("cache.cachefile", cachefile)); | ||||
| //s.addParam(createParam("algorithm.provider","---")); // i don´t know any valid | |||||
| //s.addParam(createParam("algorithm.provider","---")); // i don't know any valid | |||||
| s.addParam(createParam("cache","propertyfile")); | s.addParam(createParam("cache","propertyfile")); | ||||
| s.addParam(createParam("update","true")); | s.addParam(createParam("update","true")); | ||||
| s.addParam(createParam("comparator","rule")); | s.addParam(createParam("comparator","rule")); | ||||
| @@ -404,7 +404,7 @@ public class ModifiedSelectorTest extends BaseSelectorTest { | |||||
| * <param name="cache" value="propertyfiles" /> | * <param name="cache" value="propertyfiles" /> | ||||
| * </custom> | * </custom> | ||||
| * </pre> It was important first to set the cache and then to set | * </pre> It was important first to set the cache and then to set | ||||
| * the cache´s configuration parameters. That results in the reorganized | |||||
| * the cache's configuration parameters. That results in the reorganized | |||||
| * configure() method of ModifiedSelector. This testcase tests that. | * configure() method of ModifiedSelector. This testcase tests that. | ||||
| */ | */ | ||||
| public void testCreatePropertiesCacheViaCustomSelector() { | public void testCreatePropertiesCacheViaCustomSelector() { | ||||
| @@ -535,7 +535,7 @@ public class ModifiedSelectorTest extends BaseSelectorTest { | |||||
| assertTrue("Not enough files copied on first time.", to1.list().length>5); | assertTrue("Not enough files copied on first time.", to1.list().length>5); | ||||
| assertTrue("Too much files copied on second time.", to2.list().length==0); | assertTrue("Too much files copied on second time.", to2.list().length==0); | ||||
| assertTrue("Too much files copied on third time.", to3.list().length==2); | assertTrue("Too much files copied on third time.", to3.list().length==2); | ||||
| // don´t catch the JUnit exceptions | |||||
| // don't catch the JUnit exceptions | |||||
| } finally { | } finally { | ||||
| bft.doTarget("modifiedselectortest-scenario-clean"); | bft.doTarget("modifiedselectortest-scenario-clean"); | ||||
| bft.deletePropertiesfile(); | bft.deletePropertiesfile(); | ||||