From 96f34baad47b2dbf73e84f2bfc4345763fd08287 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Fri, 5 Nov 2021 12:27:16 +0100 Subject: [PATCH] IDEMPIERE-5028 NPE on 2Pack when a TableIndex deferred cannot find the Table (#966) --- .../org/adempiere/pipo2/handler/TableIndexElementHandler.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/TableIndexElementHandler.java b/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/TableIndexElementHandler.java index f39ae1c45a..95193a710f 100644 --- a/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/TableIndexElementHandler.java +++ b/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/TableIndexElementHandler.java @@ -90,6 +90,8 @@ public class TableIndexElementHandler extends AbstractElementHandler { @Override public void endElement(PIPOContext ctx, Element element) throws SAXException { MTableIndex mTableIndex = findPO(ctx, element); + if (element.defer && mTableIndex == null) + return; int success = validateTableIndex(ctx, mTableIndex); X_AD_Package_Imp_Detail dbDetail = createImportDetail(ctx, "dbIndex", MTableIndex.Table_Name, MTableIndex.Table_ID); if (success == 1) {