RFR: 8291226: Create Test Cases to cover scenarios for JDK-8278067 [v3]

Ramesh Bhagavatam Gangadhar rgangadhar at openjdk.org
Mon Aug 22 17:18:23 UTC 2022


On Mon, 22 Aug 2022 14:53:50 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:

> This file is a java file and should have a `.java` extension.

My Bad . Yes thank you @dfuch . done this change

> test/jdk/sun/net/www/http/HttpClient/KeepAliveTest line 574:
> 
>> 572:     }
>> 573:     // exercise the logging code
>> 574:     Logger logger = Logger.getLogger("sun.net.www.protocol.http.HttpURLConnection");
> 
> The logger should be put into a static field, or held alive using `Reference.reachabilityFence()` until the end of `main()` to prevent it from being garbage collected before the classes that use it are loaded.

ok changed. thanks @dfuch

-------------

PR: https://git.openjdk.org/jdk/pull/9958


More information about the net-dev mailing list