Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Refined Generator.java to fix a flaky error #784

Merged
merged 2 commits into from
Oct 28, 2024

Conversation

Ethan-Chin
Copy link
Contributor

@Ethan-Chin Ethan-Chin commented Oct 24, 2024

Description

This PR fixes a flaky error in setUpClass() caused by inconsistent ordering of methods returned by two separate getDeclaredMethods() calls, as described in #727.

The previous solution in #727 sorted methods by name, which added inefficiency. Instead, this PR merges the two getDeclaredMethods() calls into one, ensuring a consistent method order without the need for sorting. (#727 (comment))

Key Changes

Modified the function static Method[] functionMethods to accept the methods array as a parameter, avoiding the redundant call to getDeclaredMethods() within the function that lead to inconsistency.

Related Issues

#727

@Ethan-Chin Ethan-Chin changed the title Refined Generator.java to a fix flaky error Refined Generator.java to fix a flaky error Oct 24, 2024
@saudet
Copy link
Member

saudet commented Oct 28, 2024

Looks good, thanks for the fix!

@saudet saudet merged commit aeaad31 into bytedeco:master Oct 28, 2024
11 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants