Fix empty block corner case in PatienceDiff

There is a corner case where we get an EMPTY region during recursion,
but we didn't expect to receive that.  Its harmless to ignore the
region since the region is empty and has no content, so do so rather
than throwing an exception

Change-Id: I50dcec81ecba763072bb739adfab5879fb48b23a
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
This commit is contained in:
Shawn O. Pearce 2010-10-10 13:36:39 -07:00
parent 7a0c126d5f
commit 4fc50df97d
1 changed files with 2 additions and 0 deletions

View File

@ -182,6 +182,8 @@ private void diff(Edit r, long[] pCommon, int pIdx, int pEnd) {
break;
case EMPTY:
break;
default:
throw new IllegalStateException();
}