Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

errorprone :: Interruption #968

Merged
merged 1 commit into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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