提交 aeef000c 编写于 作者: J Juergen Hoeller

Fixed ReflectiveMethodResolver to avoid potential UnsupportedOperationException on sort

Issue: SPR-10392
上级 283b3ee4
......@@ -103,6 +103,7 @@ public class ReflectiveMethodResolver implements MethodResolver {
}
// Sort methods into a sensible order
if (methods.size() > 1) {
Collections.sort(methods, new Comparator<Method>() {
public int compare(Method m1, Method m2) {
int m1pl = m1.getParameterTypes().length;
......@@ -110,6 +111,7 @@ public class ReflectiveMethodResolver implements MethodResolver {
return (new Integer(m1pl)).compareTo(m2pl);
}
});
}
// Resolve any bridge methods
for (int i = 0; i < methods.size(); i++) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册