eclipse-lsp4j / lsp4j

A Java implementation of the language server protocol intended to be consumed by tools and language servers implemented in Java.
https://eclipse.org/lsp4j
Other
613 stars 145 forks source link

Added missing Type Adaper for RestartArguments.arguments #618

Closed cdietrich closed 2 years ago

cdietrich commented 2 years ago

Added missing Type Adaper for RestartArguments.arguments

pisv commented 2 years ago

LGTM, with just a few marginal notes:

cdietrich commented 2 years ago

renamed the class. i wonder how to test with the annotation thing instead of register globally

pisv commented 2 years ago

So far, we did not have specific unit tests for type adapter factories. Rather, there are sort of 'integration' tests for parsing/serializing protocol messages like DebugMessageJsonHandlerTest.

cdietrich commented 2 years ago

@pisv i adapted the test to test the annotated type. now if would work without the type check should i remove it?

pisv commented 2 years ago

I would suggest removing the check now for uniformity sake, and adding it later to all existing type adapter factories if/when the need arises. Just my 2c.

pisv commented 2 years ago

Perhaps the test case could be slightly improved by using assertEquals and comparing the deserialized object with the expected value.

cdietrich commented 2 years ago

done

cdietrich commented 2 years ago

created https://github.com/eclipse/lsp4j/issues/623 as follow up