keith-turner commented on code in PR #6094:
URL: https://github.com/apache/accumulo/pull/6094#discussion_r2743124076


##########
server/base/src/main/java/org/apache/accumulo/server/util/serviceStatus/ServiceStatusReport.java:
##########
@@ -26,19 +26,38 @@
 import java.time.format.DateTimeFormatter;
 import java.util.Map;
 import java.util.Set;
-import java.util.TreeMap;
-import java.util.stream.Collectors;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import com.google.gson.ExclusionStrategy;
+import com.google.gson.FieldAttributes;
 import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
 
 /**
  * Wrapper for JSON formatted report.
  */
 public class ServiceStatusReport {
 
+  private static class HostExclusionStrategy implements ExclusionStrategy {
+

Review Comment:
   Could add this constructor to check that the field actually exists.  Could 
make the field name a constant.
   
   ```suggestion
       public HostExclusionStrategy(){
           try {
               StatusSummary.class.getField("serviceByGroups");
           } catch (NoSuchFieldException e) {
               throw new IllegalStateException(e);
           }
       }
   ```



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

Reply via email to