leventov commented on a change in pull request #7969: Making 
StatusResponseHandler singleton and fixing all its instantiation invocations
URL: https://github.com/apache/incubator-druid/pull/7969#discussion_r298212079
 
 

 ##########
 File path: 
core/src/main/java/org/apache/druid/java/util/http/client/response/StatusResponseHandler.java
 ##########
 @@ -23,16 +23,24 @@
 import org.jboss.netty.handler.codec.http.HttpResponse;
 
 import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
 
 /**
  */
 public class StatusResponseHandler implements 
HttpResponseHandler<StatusResponseHolder, StatusResponseHolder>
 {
   private final Charset charset;
 
-  public StatusResponseHandler(Charset charset)
+  private static StatusResponseHandler statusResponseHandler = new 
StatusResponseHandler();
 
 Review comment:
   1. Please make `final`
   2. Conventionally, this constant is called `INSTANCE`

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to