Prevent possible NPE in PrettyFormatter
Change-Id: I81893bea2467217a68f199ab8164bb20717a6597 Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
@@ -408,7 +408,7 @@ public abstract class PrettyFormatter implements SparseHtmlFile {
|
|||||||
|
|
||||||
String line = src.get(index) + "\n";
|
String line = src.get(index) + "\n";
|
||||||
for (int c = 0; c < line.length();) {
|
for (int c = 0; c < line.length();) {
|
||||||
if (charEdits.size() <= lastIdx) {
|
if (charEdits != null && charEdits.size() <= lastIdx) {
|
||||||
appendShowBareCR(buf, line.substring(c), false);
|
appendShowBareCR(buf, line.substring(c), false);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user