Skip to content

Commit

Permalink
Merge pull request #45 from Norsk-Tipping/trello-515-stop-create-empt…
Browse files Browse the repository at this point in the history
…y-java-options

Do not set optional JVM_SYS_PROP when not defined in properties file
  • Loading branch information
jonaslar authored May 6, 2022
2 parents da9abf8 + f0a1ca0 commit 29f686b
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 29f686b

Please sign in to comment.