m-trieu commented on code in PR #30279:
URL: https://github.com/apache/beam/pull/30279#discussion_r1580995677


##########
sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/utils/ReflectUtils.java:
##########
@@ -82,6 +82,7 @@ public static List<Method> getMethods(Class<?> clazz) {
               .filter(m -> !Modifier.isPrivate(m.getModifiers()))
               .filter(m -> !Modifier.isProtected(m.getModifiers()))
               .filter(m -> !Modifier.isStatic(m.getModifiers()))
+              .sorted((m1, m2) -> m1.getName().compareTo(m2.getName()))

Review Comment:
   Nit: would it be better use some sorted data structure like SortedSet or 
immutable sorted set
   
   To prevent callers from mutating the sorting order



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to