use of com.google.api.client.repackaged.com.google.common.annotations.VisibleForTesting in project google-cloud-intellij by GoogleCloudPlatform.
the class AppEngineDeploy method parseDeployOutput.
/**
* Parse the raw json output of the deployment.
*
* @return an object modeling the output of a deploy command
* @throws JsonParseException if unable to extract the deploy output information needed
*/
@VisibleForTesting
static DeployOutput parseDeployOutput(String jsonOutput) throws JsonParseException {
Type deployOutputType = new TypeToken<DeployOutput>() {
}.getType();
DeployOutput deployOutput = new Gson().fromJson(jsonOutput, deployOutputType);
if (deployOutput == null || deployOutput.versions == null || deployOutput.versions.size() != 1) {
throw new JsonParseException("Cannot get app version: unexpected gcloud JSON output format");
}
return deployOutput;
}
Aggregations