Correct fix for potential NPE in PrettyFormatter
Commit 6eabad25087fa6f1595353078ed933cc43ad7ec8 fixed a possible NPE in PrettyFormatter but afterwards FindBugs started to report a potential NPE on a follow-up line. Change-Id: I18d112e70c6a84f436003932054e6adaa517dae1 Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
parent
5cc0690f7d
commit
b23a13d4a7
@ -408,7 +408,7 @@ public abstract class PrettyFormatter implements SparseHtmlFile {
|
||||
|
||||
String line = src.get(index) + "\n";
|
||||
for (int c = 0; c < line.length();) {
|
||||
if (charEdits != null && charEdits.size() <= lastIdx) {
|
||||
if (charEdits == null || (charEdits.size() <= lastIdx)) {
|
||||
appendShowBareCR(buf, line.substring(c), false);
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user