milleruntime commented on code in PR #2718:
URL: https://github.com/apache/accumulo/pull/2718#discussion_r881976891
##########
core/src/main/java/org/apache/accumulo/core/metadata/schema/RootGcCandidatesJson.java:
##########
@@ -96,20 +98,6 @@ public Stream<String> stream() {
}
public String toJson() {
- GSonData gd = new GSonData();
- gd.candidates = candidates;
- return GSON.toJson(gd);
- }
-
- public static RootGcCandidates fromJson(String json) {
- GSonData gd = GSON.fromJson(json, GSonData.class);
-
- Preconditions.checkArgument(gd.version == 1);
-
- return new RootGcCandidates(gd.candidates);
- }
-
- public static RootGcCandidates fromJson(byte[] json) {
- return fromJson(new String(json, UTF_8));
+ return GSON.toJson(this);
Review Comment:
I brought back the static inner classes in
[afac496](https://github.com/apache/accumulo/pull/2718/commits/afac49674106a50c19c142204733652f6e77a13a)
but made the names a little more descriptive.
--
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]