Skip to content

Commit

Permalink
Fix bug in JobSpecSerializer of inadequately preventing access erro…
Browse files Browse the repository at this point in the history
…rs (within `MysqlJobCatalog`)
  • Loading branch information
phet committed Dec 21, 2021
1 parent 55d662f commit f851184
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ public JsonElement serialize(JobSpec src, Type typeOfSrc, JsonSerializationConte
jobSpecJson.add(JOB_SPEC_URI_KEY, context.serialize(src.getUri()));
jobSpecJson.add(JOB_SPEC_VERSION_KEY, context.serialize(src.getVersion()));
jobSpecJson.add(JOB_SPEC_DESCRIPTION_KEY, context.serialize(src.getDescription()));
jobSpecJson.add(JOB_SPEC_TEMPLATE_URI_KEY, src.getTemplateURI().isPresent() ? context.serialize(src.getJobTemplate().get()): null);
jobSpecJson.add(JOB_SPEC_TEMPLATE_URI_KEY, src.getTemplateURI().isPresent() ? context.serialize(src.getTemplateURI().get()) : null);
jobSpecJson.add(JOB_SPEC_CONFIG_AS_PROPERTIES_KEY, context.serialize(src.getConfigAsProperties()));
// NOTE: do not serialize `JobSpec.jobTemplate`, since `transient`

return jobSpecJson;
}
Expand Down

0 comments on commit f851184

Please sign in to comment.