mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 23:34:52 +02:00
8290002: (se) AssertionError in SelectorImpl.implCloseSelector
Reviewed-by: michaelm
This commit is contained in:
parent
95c8022958
commit
fc01666a58
1 changed files with 4 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2000, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -196,7 +196,7 @@ public abstract class SelectorImpl
|
||||||
selectedKeys.remove(ski);
|
selectedKeys.remove(ski);
|
||||||
i.remove();
|
i.remove();
|
||||||
}
|
}
|
||||||
assert selectedKeys.isEmpty() && keys.isEmpty();
|
assert selectedKeys.isEmpty();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -226,7 +226,8 @@ public abstract class SelectorImpl
|
||||||
keys.remove(k);
|
keys.remove(k);
|
||||||
k.cancel();
|
k.cancel();
|
||||||
throw e;
|
throw e;
|
||||||
} catch (CancelledKeyException ignored) {
|
} catch (CancelledKeyException e) {
|
||||||
|
// key observed and cancelled. Okay to return a cancelled key.
|
||||||
}
|
}
|
||||||
return k;
|
return k;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue