ServerImpl misplaced null check
david.holmes at oracle.com
Thu Jan 21 08:59:14 UTC 2016
cc'ing net-dev as this is not a build issue.
On 21/01/2016 4:18 AM, Scott Palmer wrote:
> I was searching for a way to set TCP_NODELAY for an Endpoint using the default HTTP server and after finally tracking down the existence of the “sun.net.httpserver.nodelay” system property I noticed what appears to be a mistake (though not a big one) in the source code.
> Look here:
> Notice the null check on ‘chan’ is performed after it may have been dereferenced to set the TCP_NODELAY on the channel’s socket. If chan truly can be null at that point, the check needs to be move up a few lines.
More information about the build-dev