解决空指针异常

原因:缺少ADAS数据文件导致异常,被捕获后往下执行,遍历BufferReader数组中元素然后调用close(),但数组中
元素为null。

Signed-off-by: chenfufeng <chenfufeng@zhidaoauto.com>
This commit is contained in:
chenfufeng
2021-09-15 15:49:05 +08:00
parent 9796e46703
commit ec8d5e0a5b

View File

@@ -729,7 +729,7 @@ public class MockIntentHandler implements IntentHandler {
try {
if (readers != null) {
for (BufferedReader reader : readers) {
reader.close();
if (reader != null) reader.close();
}
}
} catch (IOException ex) {