I have the following cloud endpoint:
@ApiMethod(name = "test.insert")
public Test insertTest(final Test test)
{
// test is Test here, but not null
}
I pass null as parameter on the Android client:
api.test().insert(null).execute();
On the backend, a Test object is created, where all fields are null. But the object itself is not null.
- How can I test the object for null or prevent null to be passed into the API?
I know I can make @Named parameters @Nullable, but for the object parameter it looks like GCE or REST does not reconstitute null objects as expected.