-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added missing Type Adaper for RestartArguments.arguments #618
Conversation
@SuppressWarnings("unchecked") | ||
@Override | ||
public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) { | ||
if (!ELEMENT_TYPE.equals(type)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this correct. without it will stackoverflow
public class RestartArgumentsTypeAdapterFactoryTest { | ||
|
||
@Test | ||
public void test() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a better way to test such things?
aef219e
to
40b8263
Compare
LGTM, with just a few marginal notes:
|
40b8263
to
640ceab
Compare
renamed the class. i wonder how to test with the annotation thing instead of register globally |
640ceab
to
81faa37
Compare
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 |
81faa37
to
554309f
Compare
@pisv i adapted the test to test the annotated type. |
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. |
Perhaps the test case could be slightly improved by using |
Signed-off-by: Christian Dietrich <christian.dietrich@itemis.de>
554309f
to
eec8a7d
Compare
done |
created #623 as follow up |
Added missing Type Adaper for RestartArguments.arguments