diff options
author | Arne Juul <arnej@yahooinc.com> | 2022-11-25 16:24:09 +0000 |
---|---|---|
committer | Arne Juul <arnej@yahooinc.com> | 2022-11-25 16:24:40 +0000 |
commit | bd0e822d02d238ad52378600cfbced761abffe97 (patch) | |
tree | 36f19dfb9477eb9114f6e5beadff2835ef4ddc1c /client | |
parent | c27a54b10f402e383b33d8018f014296f7835ad8 (diff) |
simpler check for presence
Diffstat (limited to 'client')
-rw-r--r-- | client/go/jvm/options.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/client/go/jvm/options.go b/client/go/jvm/options.go index dae66690966..deb842936ba 100644 --- a/client/go/jvm/options.go +++ b/client/go/jvm/options.go @@ -18,7 +18,6 @@ type Options struct { container Container classPath []string jvmArgs []string - present map[string]bool mainClass string fixSpec util.FixSpec } @@ -35,15 +34,16 @@ func NewOptions(c Container) *Options { container: c, classPath: make([]string, 0, 10), jvmArgs: make([]string, 0, 100), - present: make(map[string]bool), mainClass: DEFAULT_MAIN_CLASS, fixSpec: fixSpec, } } func (opts *Options) AddOption(arg string) { - if present := opts.present[arg]; present { - return + for _, old := range opts.jvmArgs { + if arg == old { + return + } } opts.AppendOption(arg) } |