Open ErrReporter opened 3 years ago
感谢反馈,实际使用是不会触发的。
isArrayMainTable 是指
{
"[]": {
"Table": { // 对应 parentPath 为 []
}
}
}
里面的 Table, 对应 parentPath 为 [],一定不是 null。不过加个判空也行,减少大家的困惑。 可以提个 Pull Request,会把你加到贡献者列表里哦 https://github.com/Tencent/APIJSON/blob/master/CONTRIBUTING.md
环境信息
问题描述
Hello, Our code analyses found the following potential NPE:
null作为第2个参数传递给函数onObjectParse https://github.com/Tencent/APIJSON/blob/d78967a05d8b6a51ae3f7f28266b8cd87f2cc42f/APIJSONORM/src/main/java/apijson/orm/AbstractParser.java#L373
调用parentPath的java.lang.String.lastIndexOf方法(parentPath可能为空指针) https://github.com/Tencent/APIJSON/blob/d78967a05d8b6a51ae3f7f28266b8cd87f2cc42f/APIJSONORM/src/main/java/apijson/orm/AbstractParser.java#L879
Commit: d78967a05d8b6a51ae3f7f28266b8cd87f2cc42f