jadx icon indicating copy to clipboard operation
jadx copied to clipboard

[core] Generation of duplicated methods

Open bagipro opened this issue 1 year ago • 1 comments

Hey,

Please check the com/ebay/db/notifications/FcmTokenEntity.java file. It contains a few duplicated methods:

    @org.jetbrains.annotations.NotNull
    /* renamed from: component1  reason: from getter */
    public final java.lang.String getHashedUserId() {
        return this.hashedUserId;
    }

    @org.jetbrains.annotations.NotNull
    /* renamed from: component2  reason: from getter */
    public final java.lang.String getDeviceToken() {
        return this.deviceToken;
    }

and

    @org.jetbrains.annotations.NotNull
    public final java.lang.String getDeviceToken() {
        return this.deviceToken;
    }

    @org.jetbrains.annotations.NotNull
    public final java.lang.String getHashedUserId() {
        return this.hashedUserId;
    }

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

bagipro avatar Jul 31 '23 18:07 bagipro

Verified using latest unstable version.

It seems like jadx.plugins.kotlin.metadata.pass.KotlinMetadataDecompilePass#renameGetters doesn't check if a new method name already exists before applying the new name.

Workaround: If you switch to the latest unstable jadx version you can disable in Jadx Preferences -> Plugins -> Kotlin metadata -> rename simple getters to field names

jpstotz avatar Aug 30 '23 16:08 jpstotz