Skip to content

Commit

Permalink
errorprone :: Interruption (#968)
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-mlb authored Oct 11, 2024
1 parent 1f21daa commit d96641b
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/main/java/emissary/core/HDMobileAgent.java
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,7 @@ public String getLastPlaceProcessed() {
* Interrupt the agent's thread Seems a little weird to be public, but there aren't a lot of choices.
*/
@Override
@SuppressWarnings("Interruption")
public void interrupt() {
this.thread.interrupt();
}
Expand Down
1 change: 1 addition & 0 deletions src/main/java/emissary/core/MobileAgent.java
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ public void killAgent() {
* Kill asynchronously
*/
@Override
@SuppressWarnings("Interruption")
public void killAgentAsync() {
logger.debug("killAgentAsync called on {}", getName());
this.timeToQuit = true;
Expand Down
1 change: 1 addition & 0 deletions src/main/java/emissary/util/shell/ReadOutputBuffer.java
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ void runImpl() {
}

@Override
@SuppressWarnings("Interruption")
public void finish() {
this.finished = true;
this.interrupt();
Expand Down
1 change: 1 addition & 0 deletions src/main/java/emissary/util/shell/ReadOutputLogger.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ void runImpl() {
}

@Override
@SuppressWarnings("Interruption")
public void finish() {
this.finished = true;
this.interrupt();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ public Thread tryMatchInThread(final CharSequence input, final String regex, fin
}

@Test
@SuppressWarnings("Interruption")
void testNoninterruptibleString() throws InterruptedException {
BlockingQueue<Object> blockingQueue = new LinkedBlockingQueue<>();
Thread t = tryMatchInThread(INPUT, BACKTRACKER, blockingQueue);
Expand All @@ -78,6 +79,7 @@ void testNoninterruptibleString() throws InterruptedException {
}

@Test
@SuppressWarnings("Interruption")
void testInterruptibleCharSequence() throws InterruptedException {
long sleepMillis = 32;
String obnoxiousInput = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab";
Expand Down

0 comments on commit d96641b

Please sign in to comment.