Skip to content

Commit

Permalink
Annotate two more exception classes for nullness (eisop#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
cpovirk authored May 4, 2022
1 parent bf2bd20 commit e4ec536
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@

package java.io;

import org.checkerframework.checker.nullness.qual.Nullable;
import org.checkerframework.framework.qual.AnnotatedFor;

/**
* Signals that an I/O operation has been interrupted. An
* <code>InterruptedIOException</code> is thrown to indicate that an
Expand All @@ -39,6 +42,7 @@
* @see java.lang.Thread#interrupt()
* @since 1.0
*/
@AnnotatedFor({"nullness"})
public
class InterruptedIOException extends IOException {
private static final long serialVersionUID = 4020568460727500567L;
Expand All @@ -60,7 +64,7 @@ public InterruptedIOException() {
*
* @param s the detail message.
*/
public InterruptedIOException(String s) {
public InterruptedIOException(@Nullable String s) {
super(s);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@

package java.util.concurrent;

import org.checkerframework.checker.nullness.qual.Nullable;
import org.checkerframework.framework.qual.AnnotatedFor;

/**
* Exception thrown when a blocking operation times out. Blocking
* operations for which a timeout is specified need a means to
Expand All @@ -46,6 +49,7 @@
* @since 1.5
* @author Doug Lea
*/
@AnnotatedFor({"nullness"})
public class TimeoutException extends Exception {
private static final long serialVersionUID = 1900926677490660714L;

Expand All @@ -61,7 +65,7 @@ public TimeoutException() {}
*
* @param message the detail message
*/
public TimeoutException(String message) {
public TimeoutException(@Nullable String message) {
super(message);
}
}

0 comments on commit e4ec536

Please sign in to comment.