Skip to content

Fix #2701#2702

Merged
skylot merged 3 commits intoskylot:masterfrom
histausse:master
Nov 29, 2025
Merged

Fix #2701#2702
skylot merged 3 commits intoskylot:masterfrom
histausse:master

Conversation

@histausse
Copy link
Copy Markdown
Contributor

@histausse histausse commented Nov 24, 2025

Display the correct class implementation in case of duplication (Fix #2701).

When adding a class already present in the mappings of RootNode, compare the dex file names are now compared to select the right class.
The GUI list classes from the JavaPackage, which contains all classes implementation and appears to select the last one (?). Fixing this is a little tricky because having all classes in JavaPackage might be the desired/expected behavior, but it feels strange to perform additional computations from outside an API class to select the right class, so I added another attribute to JavaPackage listing classes without the duplicates.

They are probably other places in the code that select an arbitrary implementation instead of the one used at runtime, but this fix the issue for files generated by the cli and the classes displayed by the gui from the tree menu.

@skylot skylot merged commit 1d831d8 into skylot:master Nov 29, 2025
@skylot
Copy link
Copy Markdown
Owner

skylot commented Nov 29, 2025

@histausse thanks for your PR 👍
Although, I slightly refactor and improve your changes in commit 56ae4a6

@histausse
Copy link
Copy Markdown
Contributor Author

histausse commented Nov 29, 2025

Thank for the merge @skylot.
You missed an edge case in your refactoring: classes1.dex , classes0.dex and any classes0X.dex are not valid dex names. In isClassesDex() you should check that the group captured by the regex is not 1 and that it does not start with a "0".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[core] Wrong class implementation displayed when an application contains duplicates

2 participants