You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "dlmarion (via GitHub)" <gi...@apache.org> on 2023/06/22 18:09:06 UTC

[GitHub] [accumulo] dlmarion commented on a diff in pull request #3516: Create Gson singleton to use in place of new instances

dlmarion commented on code in PR #3516:
URL: https://github.com/apache/accumulo/pull/3516#discussion_r1238873954


##########
core/src/main/java/org/apache/accumulo/core/lock/ServiceLockData.java:
##########
@@ -29,13 +29,14 @@
 import java.util.UUID;
 
 import org.apache.accumulo.core.util.AddressUtil;
+import org.apache.accumulo.core.util.GsonSingleton;
 
 import com.google.common.net.HostAndPort;
 import com.google.gson.Gson;
 
 public class ServiceLockData implements Comparable<ServiceLockData> {
 
-  private static final Gson gson = new Gson();
+  private static final Gson gson = GsonSingleton.getInstance();

Review Comment:
   I'm wondering if we should remove all of the static members from the classes that use GsonSingleton. They don't provide any real 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: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org