diff --git a/jdk/src/share/classes/sun/nio/ch/CompletedFuture.java b/jdk/src/share/classes/sun/nio/ch/CompletedFuture.java index c3152db6097..ad355d3fef9 100644 --- a/jdk/src/share/classes/sun/nio/ch/CompletedFuture.java +++ b/jdk/src/share/classes/sun/nio/ch/CompletedFuture.java @@ -44,20 +44,17 @@ final class CompletedFuture implements Future { this.exc = exc; } - @SuppressWarnings("unchecked") static CompletedFuture withResult(V result) { return new CompletedFuture(result, null); } - @SuppressWarnings("unchecked") static CompletedFuture withFailure(Throwable exc) { // exception must be IOException or SecurityException if (!(exc instanceof IOException) && !(exc instanceof SecurityException)) exc = new IOException(exc); - return new CompletedFuture(null, exc); + return new CompletedFuture(null, exc); } - @SuppressWarnings("unchecked") static CompletedFuture withResult(V result, Throwable exc) { if (exc == null) { return withResult(result);