garydgregory commented on code in PR #556:
URL: 
https://github.com/apache/httpcomponents-core/pull/556#discussion_r2345082829


##########
httpcore5/src/main/java/org/apache/hc/core5/http/impl/bootstrap/AsyncServerBootstrap.java:
##########
@@ -95,10 +95,12 @@ public class AsyncServerBootstrap {
     private IOSessionListener sessionListener;
     private Http1StreamListener streamListener;
     private IOReactorMetricsListener threadPoolListener;
+    private boolean localAuthorityResolver;
 
     private AsyncServerBootstrap() {
         this.routeEntries = new ArrayList<>();
         this.filters = new ArrayList<>();
+        this.localAuthorityResolver = false;

Review Comment:
   Don't initialize a primitive to its default value.



##########
httpcore5/src/main/java/org/apache/hc/core5/http/impl/bootstrap/ServerBootstrap.java:
##########
@@ -98,10 +98,12 @@ public class ServerBootstrap {
     private HttpConnectionFactory<? extends DefaultBHttpServerConnection> 
connectionFactory;
     private ExceptionListener exceptionListener;
     private Http1StreamListener streamListener;
+    private boolean localAuthorityResolver;
 
     private ServerBootstrap() {
         this.routeEntries = new ArrayList<>();
         this.filters = new ArrayList<>();
+        this.localAuthorityResolver = false;

Review Comment:
   Same comment as above.



##########
httpcore5/src/main/java/org/apache/hc/core5/http/impl/bootstrap/ServerBootstrap.java:
##########
@@ -346,6 +348,16 @@ public final ServerBootstrap addFilterLast(final String 
name, final HttpFilterHa
         return this;
     }
 
+    /**
+     * Create {@link RequestRouter} with LOCAL_AUTHORITY_RESOLVER (default: 
IGNORE_PORT_AUTHORITY_RESOLVER).
+     *
+     * @since 5.4
+     */
+    public final ServerBootstrap useLocalAuthorityResolver() {
+        this.localAuthorityResolver = true;

Review Comment:
   Same comment as above.



##########
httpcore5/src/main/java/org/apache/hc/core5/http/impl/bootstrap/AsyncServerBootstrap.java:
##########
@@ -435,6 +437,16 @@ public final AsyncServerBootstrap addFilterLast(final 
String name, final AsyncFi
         return this;
     }
 
+    /**
+     * Create {@link RequestRouter} with LOCAL_AUTHORITY_RESOLVER (default: 
IGNORE_PORT_AUTHORITY_RESOLVER).
+     *
+     * @since 5.4
+     */
+    public final AsyncServerBootstrap useLocalAuthorityResolver() {

Review Comment:
   Bad API design IMO, pass in the the boolean value, such that, for example, 
an event like a UI checkbox (or anything really) can toggle the value.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to