Move static converter legality checks to compile time.
The information about whether a converter correctly matches the type of option it is meant to convert strings to is available at compile time. There is no reason to do this check at runtime.
Now, for an option to compile, it will need to have a converter that matches the option's type, taking into account whether the option is expected to accumulate multiple values. If it does not specify its own converter, a matching converter in the Converters.DEFAULT_CONVERTER list must be found, and the default value provided must be parseable by the matching default converter.
Remove tests that were testing failure modes which no longer compile.
RELNOTES: None.
PiperOrigin-RevId: 167092773
GitOrigin-RevId: 3e44d5b0de694632ac802c81838063d7f8563998
Change-Id: Ia5b5e462353f070276c311247758dba3a28be16a
6 files changed
tree: 1b4df0842635a604f71c95e1e1151baa87f300ce
- java/