diff --git a/src/share/classes/sun/nio/ch/CompletedFuture.java b/src/share/classes/sun/nio/ch/CompletedFuture.java index c3152db6097743b1f584dd78e924bc6916149c01..ad355d3fef90dae59488706a3a4cbf3e6f1f26c6 100644 --- a/src/share/classes/sun/nio/ch/CompletedFuture.java +++ b/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);