Skip to content

Commit

Permalink
JACOBIN-333 Added -ea command line option for compatibility with JDK.…
Browse files Browse the repository at this point in the history
… It does nothing. However, it's needed for Jacotest suite.
  • Loading branch information
platypusguy committed Aug 8, 2023
1 parent 0832201 commit 96ca47c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/jvm/option_table_loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ func LoadOptionsTable(Global globals.Globals) {
Global.Options["--dry-run"] = dryRun
dryRun.Set = true

ea := globals.Option{false, false, 0, enableAssertions}
Global.Options["-ea"] = ea

help := globals.Option{true, false, 0, showHelpStderrAndExit}
Global.Options["-h"] = help
Global.Options["-help"] = help
Expand Down Expand Up @@ -186,6 +189,12 @@ func enableTraceInstructions(pos int, argValue string, gl *globals.Globals) (int
return pos, nil
}

func enableAssertions(pos int, name string, gl *globals.Globals) (int, error) {
// at present, this option is accepted but does nothing. Its acceptance is needed
// in order to enable certain functionality in the Jacotest suite
return pos, nil
}

// set verbosity level. Note Jacobin starts up at WARNING level, so there is no
// need to set it to that level. You cannot set the level to coarser than WARNING
// which is why there is no way to set the verbosity to SEVERE only.
Expand Down

0 comments on commit 96ca47c

Please sign in to comment.