--- a/jdk/src/share/classes/sun/nio/ch/SelectorImpl.java Wed Jul 27 18:10:10 2011 +0100
+++ b/jdk/src/share/classes/sun/nio/ch/SelectorImpl.java Thu Jul 28 13:34:31 2011 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -30,7 +30,6 @@
import java.nio.channels.spi.*;
import java.net.SocketException;
import java.util.*;
-import sun.misc.*;
/**
@@ -140,19 +139,16 @@
void processDeregisterQueue() throws IOException {
// Precondition: Synchronized on this, keys, and selectedKeys
- Set cks = cancelledKeys();
+ Set<SelectionKey> cks = cancelledKeys();
synchronized (cks) {
if (!cks.isEmpty()) {
- Iterator i = cks.iterator();
+ Iterator<SelectionKey> i = cks.iterator();
while (i.hasNext()) {
SelectionKeyImpl ski = (SelectionKeyImpl)i.next();
try {
implDereg(ski);
} catch (SocketException se) {
- IOException ioe = new IOException(
- "Error deregistering key");
- ioe.initCause(se);
- throw ioe;
+ throw new IOException("Error deregistering key", se);
} finally {
i.remove();
}