DomGarguilo commented on PR #3833:
URL: https://github.com/apache/accumulo/pull/3833#issuecomment-1758394180

   > Try the following:
   > 
   > ```
   > public static String createSelectedFilesJson(Long txid, boolean selAll,
   >       Collection<String> paths) {
   >     String filesJsonArray = GSON.get().toJson(paths);
   >     String formattedTxid = 
FateTxId.formatTid(Long.parseLong(Long.toString(txid), 16));
   >     return ("{'txid':'" + formattedTxid + "','selAll':" + selAll + 
",'files':" + filesJsonArray
   >         + "}").replace('\'', '\"');
   >   }
   > ```
   
   At this point we might as well use GSON to construct the whole thing right? 
But then we might end up rewriting the code that is used in 
`SelectedFilesTypeAdapter.write()`. Not sure if that would defeat the purpose 
of the test or if we can factor that out for use in the test and within 
`SelectedFilesTypeAdapter.write()`.


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