dsmiley commented on code in PR #1632:
URL: https://github.com/apache/solr/pull/1632#discussion_r1322296243


##########
solr/core/src/test/org/apache/solr/servlet/HideStackTraceTest.java:
##########
@@ -0,0 +1,175 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.solr.servlet;
+
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.util.EntityUtils;

Review Comment:
   As a project, we'd like to get away from needless use of Apache HttpClient.  
We can use JDK HttpClient here.



##########
solr/core/src/java/org/apache/solr/core/CoreContainer.java:
##########
@@ -301,6 +301,8 @@ && getZkController().getOverseer() != null
 
   private final AllowListUrlChecker allowListUrlChecker;
 
+  private final boolean hideStackTrace;

Review Comment:
   I don't think a simple global boolean needs to be yet another field on 
CoreContainer.  Even the NodeConfig stuff is overkill for what could be a 
system property.
   
   If we do keep NodeConfig, we could still do away with this field because the 
NodeConfig stays around as a field on CoreContainer as `cfg`.



##########
solr/core/src/java/org/apache/solr/servlet/ResponseUtils.java:
##########
@@ -28,6 +28,10 @@
 public class ResponseUtils {
   private ResponseUtils() {}
 
+  // System property to use if the Solr core does not exist or 
solr.hideStackTrace is not
+  // configured. (i.e.: a lot of unit test).
+  private static final boolean SYSTEM_HIDE_STACK_TRACES = 
Boolean.getBoolean("solr.hideStackTrace");

Review Comment:
   This is all we need for internal config IMO.



-- 
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