From d51fc4fb8ce8d2ffe94941109c916783835f9bca Mon Sep 17 00:00:00 2001 From: hengsin Date: Mon, 5 Jun 2023 21:07:41 +0800 Subject: [PATCH] IDEMPIERE-5756 2PackActivator: should check Adempiere.isStarted instead of getThreadPoolExecutor (#1876) --- .../src/org/adempiere/plugin/utils/AdempiereActivator.java | 2 +- .../org/adempiere/plugin/utils/Incremental2PackActivator.java | 2 +- .../org/adempiere/plugin/utils/PackInApplicationActivator.java | 2 +- .../src/org/adempiere/plugin/utils/Version2PackActivator.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/org.adempiere.plugin.utils/src/org/adempiere/plugin/utils/AdempiereActivator.java b/org.adempiere.plugin.utils/src/org/adempiere/plugin/utils/AdempiereActivator.java index f6de95835a..9f00cb77b9 100644 --- a/org.adempiere.plugin.utils/src/org/adempiere/plugin/utils/AdempiereActivator.java +++ b/org.adempiere.plugin.utils/src/org/adempiere/plugin/utils/AdempiereActivator.java @@ -162,7 +162,7 @@ public class AdempiereActivator extends AbstractActivator { protected void frameworkStarted() { if (service != null) { - if (Adempiere.getThreadPoolExecutor() != null) { + if (Adempiere.isStarted()) { Adempiere.getThreadPoolExecutor().execute(new Runnable() { @Override public void run() { diff --git a/org.adempiere.plugin.utils/src/org/adempiere/plugin/utils/Incremental2PackActivator.java b/org.adempiere.plugin.utils/src/org/adempiere/plugin/utils/Incremental2PackActivator.java index 410bb3956a..bbf342e2dc 100644 --- a/org.adempiere.plugin.utils/src/org/adempiere/plugin/utils/Incremental2PackActivator.java +++ b/org.adempiere.plugin.utils/src/org/adempiere/plugin/utils/Incremental2PackActivator.java @@ -281,7 +281,7 @@ public class Incremental2PackActivator extends AbstractActivator { @Override protected void frameworkStarted() { if (service != null) { - if (Adempiere.getThreadPoolExecutor() != null) { + if (Adempiere.isStarted()) { Adempiere.getThreadPoolExecutor().execute(new Runnable() { @Override public void run() { 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 e6c8b899e0..abd75475a5 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 @@ -355,7 +355,7 @@ public class PackInApplicationActivator extends AbstractActivator{ @Override protected void frameworkStarted() { if (service != null) { - if (Adempiere.getThreadPoolExecutor() != null) { + if (Adempiere.isStarted()) { Adempiere.getThreadPoolExecutor().execute(new Runnable() { @Override public void run() { diff --git a/org.adempiere.plugin.utils/src/org/adempiere/plugin/utils/Version2PackActivator.java b/org.adempiere.plugin.utils/src/org/adempiere/plugin/utils/Version2PackActivator.java index d53542e819..7972953d37 100644 --- a/org.adempiere.plugin.utils/src/org/adempiere/plugin/utils/Version2PackActivator.java +++ b/org.adempiere.plugin.utils/src/org/adempiere/plugin/utils/Version2PackActivator.java @@ -248,7 +248,7 @@ public class Version2PackActivator extends AbstractActivator{ @Override protected void frameworkStarted() { if (service != null) { - if (Adempiere.getThreadPoolExecutor() != null) { + if (Adempiere.isStarted()) { Adempiere.getThreadPoolExecutor().execute(new Runnable() { @Override public void run() {