mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-23 04:24:49 +02:00
8017611: Auto corrector for mistyped vm options
The auto corrector for mistyped vm options fuzzy-matches existing flags based on string similarity (Dice's coefficient). Reviewed-by: kvn, dsamersoff, hseigel, johnc
This commit is contained in:
parent
f93ee2a9dd
commit
7109e85e43
4 changed files with 128 additions and 4 deletions
|
@ -220,7 +220,8 @@ struct Flag {
|
|||
// number of flags
|
||||
static size_t numFlags;
|
||||
|
||||
static Flag* find_flag(char* name, size_t length, bool allow_locked = false);
|
||||
static Flag* find_flag(const char* name, size_t length, bool allow_locked = false);
|
||||
static Flag* fuzzy_match(const char* name, size_t length, bool allow_locked = false);
|
||||
|
||||
bool is_bool() const { return strcmp(type, "bool") == 0; }
|
||||
bool get_bool() const { return *((bool*) addr); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue