git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@887838 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -226,6 +226,7 @@ Miha | |||||
| Mike Davis | Mike Davis | ||||
| Mike Roberts | Mike Roberts | ||||
| mnowostawski | mnowostawski | ||||
| Nathan Beyer | |||||
| Nick Chalko | Nick Chalko | ||||
| Nick Fortescue | Nick Fortescue | ||||
| Nick Crossley | Nick Crossley | ||||
| @@ -530,6 +530,10 @@ Fixed bugs: | |||||
| overwrite each others attributes/nested elements. | overwrite each others attributes/nested elements. | ||||
| Bugzilla Report 41602. | Bugzilla Report 41602. | ||||
| * The Hashvalue algortihm implementation of the modified task could | |||||
| fail to read the file(s) completely. | |||||
| Bugzilla Report 48313. | |||||
| Other changes: | Other changes: | ||||
| -------------- | -------------- | ||||
| @@ -929,6 +929,10 @@ | |||||
| <name> | <name> | ||||
| <last>mnowostawski</last> | <last>mnowostawski</last> | ||||
| </name> | </name> | ||||
| <name> | |||||
| <first>Nathan</first> | |||||
| <last>Beyer</last> | |||||
| </name> | |||||
| <name> | <name> | ||||
| <first>Nick</first> | <first>Nick</first> | ||||
| <last>Chalko</last> | <last>Chalko</last> | ||||
| @@ -56,11 +56,14 @@ public class HashvalueAlgorithm implements Algorithm { | |||||
| return null; | return null; | ||||
| } | } | ||||
| java.io.FileInputStream fis = new java.io.FileInputStream(file); | java.io.FileInputStream fis = new java.io.FileInputStream(file); | ||||
| byte[] content = new byte[fis.available()]; | |||||
| fis.read(content); | |||||
| StringBuffer content = new StringBuffer(); | |||||
| byte[] buffer = new byte[256]; | |||||
| int len = 0; | |||||
| while ((len = fis.read(buffer, 0, len)) != -1) { | |||||
| content.append(new String(buffer, 0, len)); | |||||
| } | |||||
| fis.close(); | fis.close(); | ||||
| String s = new String(content); | |||||
| int hash = s.hashCode(); | |||||
| int hash = content.toString().hashCode(); | |||||
| return Integer.toString(hash); | return Integer.toString(hash); | ||||
| } catch (Exception e) { | } catch (Exception e) { | ||||
| return null; | return null; | ||||