Refactor file path handling and improve output retrieval in JadxDecompiler#16
Open
5y3b wants to merge 1 commit into
Open
Refactor file path handling and improve output retrieval in JadxDecompiler#165y3b wants to merge 1 commit into
5y3b wants to merge 1 commit into
Conversation
…le retrieval in JadxDecompiler (if class file is changed because if bad name, jadx change it and the file name changes so it cant find it, but this fixes it)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request improves the robustness and reliability of the decompilation process in the
JadxDecompilerimplementation, particularly around locating the correct output Java file after decompilation. It also fixes a bug in reading file content in theJavaCodeProvider. The most important changes are as follows:Decompilation Output File Handling:
findGeneratedOutputFilePathtoJadxDecompilerthat attempts to locate the generated Java file using several heuristics if the expected file path does not exist, increasing resilience to naming or directory structure changes in Jadx output.collectJavaFilesto gather all.javafiles under the output directory, supporting the new output file search logic.findGeneratedOutputFilePathinstead of directly constructing the output file path, reducing errors when file names or locations are non-standard.Bug Fixes:
JavaCodeProviderwhere file content was being read usinguri.pathinstead ofuri.fsPath, which could cause issues on some platforms.(if class name is changed because of a bad name, jadx change it and the file name changes so it cant find it, but this fixes it)