This fixes two ArrayIndexOutOfBoundsException's that can occur when
navigating from one patch to the next/previous patch if the
next/previous patch is a newly added binary file.
1. if the user is not signed in:
java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 0
at com.google.gerrit.prettify.common.SparseFileContent.get(SparseFileContent.java:74)
at com.google.gerrit.prettify.common.PrettyFormatter.colorLineEdits(PrettyFormatter.java:381)
at com.google.gerrit.prettify.common.PrettyFormatter.toHTML(PrettyFormatter.java:315)
at com.google.gerrit.prettify.common.PrettyFormatter.format(PrettyFormatter.java:129)
at com.google.gerrit.client.patches.AbstractPatchContentTable.getSparseHtmlFileB(AbstractPatchContentTable.java:201)
at com.google.gerrit.client.patches.UnifiedDiffTable.render(UnifiedDiffTable.java:99)
...
2. if the user is signed in and has 'Syntax Coloring' in the preferences enabled:
java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 0
at com.google.gerrit.prettify.common.SparseFileContent.get(SparseFileContent.java:74)
at com.google.gerrit.prettify.common.PrettyFormatter.toHTML(PrettyFormatter.java:319)
at com.google.gerrit.prettify.common.PrettyFormatter.format(PrettyFormatter.java:129)
at com.google.gerrit.client.patches.AbstractPatchContentTable.getSparseHtmlFileB(AbstractPatchContentTable.java:201)
at com.google.gerrit.client.patches.UnifiedDiffTable.render(UnifiedDiffTable.java:99)
...
Bug: issue 735
Change-Id: I43716b1c868e98c083b12e57b4686528634ae390
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>