Regression in EPollArrayWrapper causes NPE when fd > 64 * 1024
Chris Hegarty
chris.hegarty at oracle.com
Mon Sep 16 20:04:19 UTC 2013
On 16/09/2013 18:49, Alan Bateman wrote:
> ....
> diff --git a/src/solaris/classes/sun/nio/ch/EPollArrayWrapper.java
> b/src/solaris/classes/sun/nio/ch/EPollArrayWrapper.java
> --- a/src/solaris/classes/sun/nio/ch/EPollArrayWrapper.java
> +++ b/src/solaris/classes/sun/nio/ch/EPollArrayWrapper.java
> @@ -175,7 +175,8 @@
> }
> } else {
> Integer key = Integer.valueOf(fd);
> - if ((eventsHigh.get(key) != KILLED) || force) {
> + Byte prev = eventsHigh.get(key);
> + if (prev == null || prev == KILLED || force) {
> eventsHigh.put(key, Byte.valueOf(events));
> }
> }
I know this is not a request for review, but the above changes look like
they should resolve the NPE.
-Chris
More information about the nio-dev
mailing list