RFR: 8303682: Simplify HttpClient DebugLogger

Jaikiran Pai jpai at openjdk.org
Wed Mar 8 11:01:08 UTC 2023


On Tue, 7 Mar 2023 10:16:24 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:

> The HttpClient internal DebugLogger could be simplified if its configuration was held in a record. Some of the methods in Utils that return a debug logger could also be simplified/removed. The system property that configures the debug logging could be extended to choose between System.err, System.out, System.Logger, or any of these configurations.
> Passing -Djdk.internal.httpclient.debug=true still works as before.

test/jdk/java/net/httpclient/DebugLoggerTest.java line 227:

> 225:         String[] values = prop.split(",");
> 226:         if (values.length == 0) return Set.of();
> 227:         Set<Destination> dest = new HashSet<>(3);

I think this should be `HashSet.newHashSet(3)` here instead of `new HashSet<>(3);`

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

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


More information about the net-dev mailing list