带有@Nullable参数的@ApiMethod,get-client-lib生成checkNotNull

时间:2015-02-13 19:37:04

标签: java api google-app-engine

我将API调用定义为

@ApiMethod(name = "getID", httpMethod = ApiMethod.HttpMethod.POST)
public SimpleResponse getID(@Nullable @Named("ses") String ses)

运行endpoints.cmd get-client-lib以生成android客户端java文件后,getID的构造函数被定义为

protected GetSessionID(java.lang.String ses) {
      this.ses = com.google.api.client.util.Preconditions.checkNotNull(ses, "Required parameter ses must be specified.");
    }

由于checkNotNull,我的客户端应用无法为“ses”发送空值。假设我可以发送与可空参数一致的空值,我错了吗?

0 个答案:

没有答案