-
Notifications
You must be signed in to change notification settings - Fork 300
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix non-deterministic return value of JavaCodeUnit.getMethod() #717
In some cases (like bridge methods) there would be more than one method matching the same name and parameter type names. Since we used a `Set` and just iterated until we found some match the result was not deterministic in these cases, i.e. depended on the JVM implementation or similar uncertain factors. We now take all code units into consideration that match name and parameters. If this result should not be deterministic we make sure to pick the non-synthetic code unit first because users are usually interested in that one (coming from their source code) instead of some synthetic code added by the compiler. Resolves: #256
- Loading branch information
Showing
2 changed files
with
59 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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