IDEMPIERE-5028 NPE on 2Pack when a TableIndex deferred cannot find the Table (#966)

This commit is contained in:
Carlos Ruiz 2021-11-05 12:27:16 +01:00 committed by GitHub
parent cbb3bf6614
commit 96f34baad4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -90,6 +90,8 @@ public class TableIndexElementHandler extends AbstractElementHandler {
@Override @Override
public void endElement(PIPOContext ctx, Element element) throws SAXException { public void endElement(PIPOContext ctx, Element element) throws SAXException {
MTableIndex mTableIndex = findPO(ctx, element); MTableIndex mTableIndex = findPO(ctx, element);
if (element.defer && mTableIndex == null)
return;
int success = validateTableIndex(ctx, mTableIndex); int success = validateTableIndex(ctx, mTableIndex);
X_AD_Package_Imp_Detail dbDetail = createImportDetail(ctx, "dbIndex", MTableIndex.Table_Name, MTableIndex.Table_ID); X_AD_Package_Imp_Detail dbDetail = createImportDetail(ctx, "dbIndex", MTableIndex.Table_Name, MTableIndex.Table_ID);
if (success == 1) { if (success == 1) {