Hi Alex,

This looks good to me.
But do we need a CSR for this?
I understand that the intention is to comply with the TransportService spec but the behavior is being changed.
How long did we have this behavior?

Thanks,
Serguei


On 8/4/20 16:32, Alex Menkov wrote:
Needs one more reviewer.

One more details to simplify review.
SocketTransportService extends TransportService and spec for TransportService.startListening() is:

    /**
     * Listens on an address chosen by the transport service.
     *
     * <p> This convenience method works as if by invoking
     * {@link #startListening(String) startListening(null)}.
     *
     * @return  a listen key to be used in subsequent calls to be
     *          {@link #accept accept} or {@link #stopListening
     *          stopListening} methods.
     *
     * @throws  IOException
     *          If an I/O error occurs.
     */
    public abstract ListenKey startListening() throws IOException;

I.e. the fix updates SocketTransportService  to comply the spec.

--alex

On 07/23/2020 13:05, Chris Plummer wrote:
Hi Alex,

I'm no expert in this area, but the changes appear to do what you describe (use the loopback address), so thumbs up.

thanks,

Chris

On 7/21/20 3:04 PM, Alex Menkov wrote:
Hi all,

please review the fix for
https://bugs.openjdk.java.net/browse/JDK-8249550

webrev:
http://cr.openjdk.java.net/~amenkov/jdk16/jdb_loopback/webrev/

some background:
https://bugs.openjdk.java.net/browse/JDK-8041435 made default listening on loopback address. Later https://bugs.openjdk.java.net/browse/JDK-8184770 added handling of "*" address to listen on all addresses, but it didn't fixed "default" startListening() method (used by jdb through SunCommandLineLauncher).

The method called startListening(String localaddress, int port) with localaddress == null, but this method for null localladdress starts listening on all addresses (i.e. handle null value as "*"). The fix changes it to startListening(String address) which handles null address the same way as JDI socket connector does (i.e. listens on loopback address only)

--alex


Reply via email to