Skip to content

Commit

Permalink
Do not set optional JVM_SYS_PROP when not defined in properties file
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaslar committed May 6, 2022
1 parent 022b02a commit f0a1ca0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/modules/java.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ func GenEnvVar_JVM_SYS_PROP(mgp metagraf.MGProperties, name string) corev1.EnvVa
if Defaults {
props = append(props, "-D"+p.Key+"="+p.Default)
} else {
props = append(props, "-D"+p.Key+"="+p.Value)
// Do not append property with empty string
if p.Value != "" {
props = append(props, "-D"+p.Key+"="+p.Value)
}
}
}
return corev1.EnvVar{
Expand Down

0 comments on commit f0a1ca0

Please sign in to comment.