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

[core] Use of registers in enum constant declaration argument #916

Closed
bagipro opened this issue Apr 28, 2020 · 2 comments
Closed

[core] Use of registers in enum constant declaration argument #916

bagipro opened this issue Apr 28, 2020 · 2 comments
Labels
bug Core Issues in jadx-core module

Comments

@bagipro
Copy link
Collaborator

bagipro commented Apr 28, 2020

Hi, I've noticed an error

package com.google.zxing;

public enum DecodeHintType {
    OTHER(java.lang.Object.class),
    PURE_BARCODE(java.lang.Void.class),
    POSSIBLE_FORMATS(java.util.List.class),
    TRY_HARDER(java.lang.Void.class),
    CHARACTER_SET(java.lang.String.class),
    ALLOWED_LENGTHS(r0), // <<<
    ASSUME_CODE_39_CHECK_DIGIT(java.lang.Void.class),
    ASSUME_GS1(java.lang.Void.class),
    RETURN_CODABAR_START_END(java.lang.Void.class),
    NEED_RESULT_POINT_CALLBACK(com.google.zxing.ResultPointCallback.class),
    ALLOWED_EAN_EXTENSIONS(r0); // <<<
    
    private final java.lang.Class<?> valueType;

    static {
        java.lang.Class<int[]> cls = int[].class; // weird useless declaration
    }

    private DecodeHintType(java.lang.Class<?> cls) {
        this.valueType = cls;
    }

    public java.lang.Class<?> getValueType() {
        return this.valueType;
    }
}

APK: https://drive.google.com/file/d/1ICfL4A22K-KhVkw5RwvWdLJA8111iYvG/view?usp=sharing

@bagipro bagipro added bug Core Issues in jadx-core module labels Apr 28, 2020
@skylot
Copy link
Owner

skylot commented May 3, 2020

@sergey-wowwow fixed exactly this case. For other possible cases, comment with a warning will be printed.

@skylot skylot closed this as completed May 3, 2020
@bagipro
Copy link
Collaborator Author

bagipro commented May 3, 2020

Thanks, will check it to find other possible errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Core Issues in jadx-core module
Projects
None yet
Development

No branches or pull requests

2 participants