What steps will reproduce the problem?
public class testGenerateUnifiedDiffWithZeroDiffs extends TestCase {
String myContent = "abc";
public void testDiffRowGenerator() {
Patch patch = DiffUtils.diff(myContent, myContent);
DiffUtils.generateUnifiedDiff("myContent.txt", "myContent.txt", myContent, patch, 0));
}
}
What is the expected output? What do you see instead?
I would expect to see no diffs. Instead I see an ArrayIndexOutOfBoundsException.
What version of the product are you using? On what operating system?
Version 1.2 on Windows XP
Please provide any additional information below.
The issue is with this line:
Delta delta = patchDeltas.get(0);
which tries to get the first delta without testing to see if there are are any
deltas.
Original issue reported on code.google.com by KI4...@gmail.com on 18 Feb 2011 at 6:40
Original issue reported on code.google.com by
KI4...@gmail.com
on 18 Feb 2011 at 6:40