Make checksum less loud, downgrading message calculating checksum to verbose PR: 25606 PR: 25607 Submitted by: Ariel Backenroth ( abackenr at interwoven dot com ) git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@275806 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -93,6 +93,8 @@ Changes that could break older environments: | |||||
| are resolved at a later stage. This causes some | are resolved at a later stage. This causes some | ||||
| differences especially for user defined task containers. | differences especially for user defined task containers. | ||||
| * <checksum> log message "Calculating checksum ..." has been degraded from INFO to VERBOSE. | |||||
| Fixed bugs: | Fixed bugs: | ||||
| ----------- | ----------- | ||||
| * Filter readers were not handling line endings properly. Bugzilla | * Filter readers were not handling line endings properly. Bugzilla | ||||
| @@ -65,4 +65,12 @@ | |||||
| </fileset> | </fileset> | ||||
| </checksum> | </checksum> | ||||
| </target> | </target> | ||||
| <!-- bug report 25606 --> | |||||
| <target name="verifyChecksumdirNoTotal"> | |||||
| <checksum todir="${basedir}/checksum/checksums"> | |||||
| <fileset dir="${basedir}/checksum"> | |||||
| <exclude name="**/*.MD5"/> | |||||
| </fileset> | |||||
| </checksum> | |||||
| </target> | |||||
| </project> | </project> | ||||
| @@ -374,7 +374,7 @@ public class Checksum extends MatchingTask implements Condition { | |||||
| String[] srcFiles = ds.getIncludedFiles(); | String[] srcFiles = ds.getIncludedFiles(); | ||||
| for (int j = 0; j < srcFiles.length; j++) { | for (int j = 0; j < srcFiles.length; j++) { | ||||
| File src = new File(fs.getDir(getProject()), srcFiles[j]); | File src = new File(fs.getDir(getProject()), srcFiles[j]); | ||||
| if (totalproperty != null) { | |||||
| if (totalproperty != null || todir != null) { | |||||
| // Use '/' to calculate digest based on file name. | // Use '/' to calculate digest based on file name. | ||||
| // This is required in order to get the same result | // This is required in order to get the same result | ||||
| // on different platforms. | // on different platforms. | ||||
| @@ -467,7 +467,7 @@ public class Checksum extends MatchingTask implements Condition { | |||||
| messageDigest.reset(); | messageDigest.reset(); | ||||
| File src = (File) e.nextElement(); | File src = (File) e.nextElement(); | ||||
| if (!isCondition) { | if (!isCondition) { | ||||
| log("Calculating " + algorithm + " checksum for " + src); | |||||
| log("Calculating " + algorithm + " checksum for " + src, Project.MSG_VERBOSE); | |||||
| } | } | ||||
| fis = new FileInputStream(src); | fis = new FileInputStream(src); | ||||
| DigestInputStream dis = new DigestInputStream(fis, | DigestInputStream dis = new DigestInputStream(fis, | ||||
| @@ -125,6 +125,9 @@ public class ChecksumTest extends BuildFileTest { | |||||
| expectPropertySet("verifyFromProperty", "verify", "true"); | expectPropertySet("verifyFromProperty", "verify", "true"); | ||||
| } | } | ||||
| public void testVerifyChecksumdirNoTotal() { | |||||
| executeTarget("verifyChecksumdirNoTotal"); | |||||
| } | |||||
| private void testVerify(String target) { | private void testVerify(String target) { | ||||
| assertNull(project.getProperty("logo.MD5")); | assertNull(project.getProperty("logo.MD5")); | ||||
| assertNull(project.getProperty("no.logo.MD5")); | assertNull(project.getProperty("no.logo.MD5")); | ||||