diff --git a/org.adempiere.plugin.utils/src/org/adempiere/plugin/utils/AbstractActivator.java b/org.adempiere.plugin.utils/src/org/adempiere/plugin/utils/AbstractActivator.java index 574cd60633..1d94bc5ab9 100644 --- a/org.adempiere.plugin.utils/src/org/adempiere/plugin/utils/AbstractActivator.java +++ b/org.adempiere.plugin.utils/src/org/adempiere/plugin/utils/AbstractActivator.java @@ -122,6 +122,11 @@ public abstract class AbstractActivator implements BundleActivator, ServiceTrack int clientId = Env.getAD_Client_ID(Env.getCtx()); if (version == null) { String [] parts = fileName.split("_"); + if (parts.length < 2) { + logger.warning("Wrong name, ignored " + fileName); + return false; + } + logger.warning(fileName); String clientValue = parts[1]; clientId = DB.getSQLValueEx(null, "SELECT AD_Client_ID FROM AD_Client WHERE Value=?", clientValue); if (clientId < 0) diff --git a/org.adempiere.plugin.utils/src/org/adempiere/plugin/utils/PackInApplicationActivator.java b/org.adempiere.plugin.utils/src/org/adempiere/plugin/utils/PackInApplicationActivator.java index 74f14a4f93..e6c8b899e0 100644 --- a/org.adempiere.plugin.utils/src/org/adempiere/plugin/utils/PackInApplicationActivator.java +++ b/org.adempiere.plugin.utils/src/org/adempiere/plugin/utils/PackInApplicationActivator.java @@ -150,12 +150,14 @@ public class PackInApplicationActivator extends AbstractActivator{ private boolean packIn(File packinFile) { if (packinFile != null) { String fileName = packinFile.getName(); - logger.warning("Installing " + fileName + " ..."); - // The convention for package names is: yyyymmddHHMM_ClientValue_InformationalDescription.zip String [] parts = fileName.split("_"); + if (parts.length < 2) { + logger.warning("Wrong name, ignored " + fileName); + return false; + } + logger.warning("Installing " + fileName + " ..."); String clientValue = parts[1]; - boolean allClients = clientValue.startsWith("ALL-CLIENTS"); int[] clientIDs;