Skip to content

Commit

Permalink
Updated Generator.java to fix the flaky errors
Browse files Browse the repository at this point in the history
  • Loading branch information
njain2208 authored Nov 17, 2023
1 parent 78f0203 commit 4c62303
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/main/java/org/bytedeco/javacpp/tools/Generator.java
Original file line number Diff line number Diff line change
Expand Up @@ -2083,6 +2083,12 @@ boolean methods(Class<?> cls) {
}

Method[] methods = cls.getDeclaredMethods();
Arrays.sort(methods, new Comparator<Method>() {
@Override
public int compare(Method m1, Method m2) {
return m1.getName().compareTo(m2.getName());
}
});
MethodInformation[] methodInfos = new MethodInformation[methods.length];
for (int i = 0; i < methods.length; i++) {
methodInfos[i] = methodInformation(methods[i]);
Expand Down Expand Up @@ -3635,6 +3641,12 @@ static Method[] functionMethods(Class<?> cls, boolean[] callbackAllocators) {
return null;
}
Method[] methods = cls.getDeclaredMethods();
Arrays.sort(methods, new Comparator<Method>() {
@Override
public int compare(Method m1, Method m2) {
return m1.getName().compareTo(m2.getName());
}
});
Method[] functionMethods = new Method[3];
for (int i = 0; i < methods.length; i++) {
String methodName = methods[i].getName();
Expand Down

0 comments on commit 4c62303

Please sign in to comment.