/** * Compare two Resources by content. * @param foo the first Resource. * @param bar the second Resource. * @return a negative integer, zero, or a positive integer as the first * argument is less than, equal to, or greater than the second. * @throws BuildException if I/O errors occur. * @see org.apache.tools.ant.util.ResourceUtils#compareContent(Resource, Resource, boolean) */ protected int resourceCompare(Resource foo, Resource bar) { try { return ResourceUtils.compareContent(foo, bar, !binary); } catch (IOException e) { throw new BuildException(e); } }
return compareContent(r1, r2, text) == 0;