diff --git a/src/main/java/emissary/core/MobileAgent.java b/src/main/java/emissary/core/MobileAgent.java index 0a43ac6793..11167d3201 100755 --- a/src/main/java/emissary/core/MobileAgent.java +++ b/src/main/java/emissary/core/MobileAgent.java @@ -102,6 +102,7 @@ public MobileAgent() { * @param threadGroup group we operate it * @param threadName symbolic name for this agent thread */ + @SuppressWarnings("ThreadPriorityCheck") public MobileAgent(final ThreadGroup threadGroup, final String threadName) { logger.debug("Constructing agent {}", threadName); this.thread = new Thread(threadGroup, this, threadName); @@ -180,7 +181,7 @@ public void killAgent() { * Kill asynchronously */ @Override - @SuppressWarnings("Interruption") + @SuppressWarnings({"Interruption", "ThreadPriorityCheck"}) public void killAgentAsync() { logger.debug("killAgentAsync called on {}", getName()); this.timeToQuit = true; diff --git a/src/main/java/emissary/core/ResourceWatcher.java b/src/main/java/emissary/core/ResourceWatcher.java index bb6821874d..d3a57d22fb 100644 --- a/src/main/java/emissary/core/ResourceWatcher.java +++ b/src/main/java/emissary/core/ResourceWatcher.java @@ -58,6 +58,7 @@ public ResourceWatcher() { /** * Create a resource watcher set it running and bind into the NamespaceException */ + @SuppressWarnings("ThreadPriorityCheck") public ResourceWatcher(final MetricsManager metricsManager) { this.metrics = metricsManager.getMetricRegistry(); final Thread thread = new Thread(this, "ResourceWatcher"); diff --git a/src/main/java/emissary/core/sentinel/Sentinel.java b/src/main/java/emissary/core/sentinel/Sentinel.java index 5a190ddd4a..7c3d02dc32 100644 --- a/src/main/java/emissary/core/sentinel/Sentinel.java +++ b/src/main/java/emissary/core/sentinel/Sentinel.java @@ -55,6 +55,7 @@ public class Sentinel implements Runnable { /** * Create a Sentinel - set it running and bind into the {@link Namespace} */ + @SuppressWarnings("ThreadPriorityCheck") public Sentinel() { configure(); if (this.enabled) { diff --git a/src/main/java/emissary/pickup/PickUpPlace.java b/src/main/java/emissary/pickup/PickUpPlace.java index 21ce906feb..8326d57bd4 100755 --- a/src/main/java/emissary/pickup/PickUpPlace.java +++ b/src/main/java/emissary/pickup/PickUpPlace.java @@ -713,6 +713,7 @@ public void assignToPooledAgent(IBaseDataObject payload, long timeoutMs) throws * @return mobile agent assigned to pool * @throws EmissaryException when an agent cannot be obtained */ + @SuppressWarnings("ThreadPriorityCheck") public static IMobileAgent assignToPooledAgent(IBaseDataObject payload, @Nullable AgentPool agentPool, IServiceProviderPlace startingLocation, long timeoutMs) throws EmissaryException { IMobileAgent agent = null; diff --git a/src/main/java/emissary/pickup/QueServer.java b/src/main/java/emissary/pickup/QueServer.java index 4cd81b77cf..e3243e714b 100755 --- a/src/main/java/emissary/pickup/QueServer.java +++ b/src/main/java/emissary/pickup/QueServer.java @@ -57,6 +57,7 @@ public QueServer(IPickUpSpace space, PickupQueue queue, long pollingInterval) { * @param pollingInterval value in millis * @param name value to supply to Thread name */ + @SuppressWarnings("ThreadPriorityCheck") public QueServer(IPickUpSpace space, PickupQueue queue, long pollingInterval, String name) { super(name); this.space = space; @@ -116,6 +117,7 @@ public void run() { /** * Check the queue for waiting objects and process them */ + @SuppressWarnings("ThreadPriorityCheck") public void checkQue() { WorkBundle paths = queue.deque(); while (paths != null) { diff --git a/src/main/java/emissary/pickup/file/FileDataServer.java b/src/main/java/emissary/pickup/file/FileDataServer.java index 81c091f4b0..82ecaef718 100755 --- a/src/main/java/emissary/pickup/file/FileDataServer.java +++ b/src/main/java/emissary/pickup/file/FileDataServer.java @@ -45,6 +45,7 @@ public class FileDataServer extends Pausable { * @param parent the FPP that created me * @param pollingInterval how often to check for new files in millis */ + @SuppressWarnings("ThreadPriorityCheck") public FileDataServer(String inputDataDirectory, FilePickUpPlace parent, long pollingInterval) { // Name the thread diff --git a/src/main/java/emissary/pickup/file/FilePickUpPlace.java b/src/main/java/emissary/pickup/file/FilePickUpPlace.java index 5741d3ec19..3e82738f8b 100755 --- a/src/main/java/emissary/pickup/file/FilePickUpPlace.java +++ b/src/main/java/emissary/pickup/file/FilePickUpPlace.java @@ -112,6 +112,7 @@ public boolean isPaused() { /** * For each input directory start a new server thread. */ + @SuppressWarnings("ThreadPriorityCheck") public void startDataServer() { for (int i = 0; i < inputDataDirs.length; i++) { FileDataServer fds = new FileDataServer(inputDataDirs[i], this, pollingInterval); diff --git a/src/main/java/emissary/pool/MoveSpool.java b/src/main/java/emissary/pool/MoveSpool.java index 47320d5719..b8a5a3b7d3 100755 --- a/src/main/java/emissary/pool/MoveSpool.java +++ b/src/main/java/emissary/pool/MoveSpool.java @@ -76,6 +76,7 @@ public MoveSpool() { /** * Configure stuff */ + @SuppressWarnings("ThreadPriorityCheck") private void configure() { // Get the agent pool resetPool(); @@ -139,6 +140,7 @@ private IDirectoryPlace getLocalDirectory() { * Run the thread to watch the spool */ @Override + @SuppressWarnings("ThreadPriorityCheck") public void run() { int consecutiveSendCounter = 0; diff --git a/src/test/java/emissary/test/core/junit5/UnitTest.java b/src/test/java/emissary/test/core/junit5/UnitTest.java index 35bf317697..03ed8e615f 100644 --- a/src/test/java/emissary/test/core/junit5/UnitTest.java +++ b/src/test/java/emissary/test/core/junit5/UnitTest.java @@ -178,6 +178,7 @@ protected List getMyXmlResources() { * * @param millis how long to pause */ + @SuppressWarnings("ThreadPriorityCheck") protected void pause(long millis) { Thread.yield(); try {