Avoid unnecessary sorting

This commit is contained in:
Christoph Dreis
2020-02-29 15:29:04 +01:00
committed by Rossen Stoyanchev
parent 87230c4f1f
commit 2093e35f27
6 changed files with 29 additions and 14 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -154,7 +154,9 @@ public class ReflectiveAspectJAdvisorFactory extends AbstractAspectJAdvisorFacto
methods.add(method);
}
}, ReflectionUtils.USER_DECLARED_METHODS);
methods.sort(METHOD_COMPARATOR);
if (methods.size() > 1) {
methods.sort(METHOD_COMPARATOR);
}
return methods;
}