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`) (apache#3447)
  • Loading branch information
phet authored and jack-moseley committed Aug 24, 2022
1 parent da8c226 commit e91a670
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 e91a670

Please sign in to comment.