Closed xcariba closed 4 years ago
Good catch! I introduced org.lxtk.jsonrpc.DefaultGson
to handle this a while ago, but apparently some cases slipped through the cracks. It seems that DiagnosticMarkers
, AbstractMarkerResolutionGenerator
, and AbstractQuickAssistProcessor
need to be updated to use DefaultGson.INSTANCE
. (There is no need to have the gson
field in those classes any longer.) Would you mind updating the PR?
We can add
EitherTypeAdapter
in gson to serialize diagnostics in marker.Gson
is properly initialized in lsp4j.jsonrpc hereWe can use only Either adapter or we can add all adapter for safety. Or we can use something like
new MessageJsonHandler(Map.of()).getDefaultGsonBuilder().create()
for consistency.