Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make enum CLI arguments match documented format #1787

Merged
merged 1 commit into from
Feb 27, 2023

Commits on Feb 27, 2023

  1. Make enum CLI arguments match documented format

    Currently if you do `jadx --help`, it says the `--deobf-cfg-file-mode` option accepts the value `read-or-save`. 
    
    However, if you give it that option, it instead prints the following error message:
    
    ```
    java.lang.IllegalArgumentException: 'read-or-save' is unknown, possible values are: read, read-or-save, overwrite, ignore
    	at jadx.cli.JadxCLIArgs$DeobfuscationMapFileModeConverter.convert(JadxCLIArgs.java:524)
    	at jadx.cli.JadxCLIArgs$DeobfuscationMapFileModeConverter.convert(JadxCLIArgs.java:516)
    	at com.beust.jcommander.JCommander.convertValue(JCommander.java:1340)
    	at com.beust.jcommander.ParameterDescription.addValue(ParameterDescription.java:249)
    	at com.beust.jcommander.JCommander.processFixedArity(JCommander.java:920)
    	at com.beust.jcommander.JCommander.processFixedArity(JCommander.java:901)
    	at com.beust.jcommander.JCommander.parseValues(JCommander.java:731)
    	at com.beust.jcommander.JCommander.parse(JCommander.java:363)
    	at com.beust.jcommander.JCommander.parse(JCommander.java:342)
    	at jadx.cli.JCommanderWrapper.parse(JCommanderWrapper.java:37)
    	at jadx.cli.JadxCLIArgs.processArgs(JadxCLIArgs.java:211)
    	at jadx.cli.JadxCLI.execute(JadxCLI.java:35)
    	at jadx.cli.JadxCLI.main(JadxCLI.java:20)
    ```
    
    This commit changes all the enum parsers - except the one that already does this - to do the inverse string of `enumValuesString`, so the documented behavior works.
    jakewins authored Feb 27, 2023
    Configuration menu
    Copy the full SHA
    f6041f9 View commit details
    Browse the repository at this point in the history