mirror of
https://github.com/corda/corda.git
synced 2025-01-22 12:28:11 +00:00
AnnotationInvocationHandler: avoid calling Method#getName too often
This is only a cosmetic change, but we should not call getName() over and over again ;-) Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
parent
db0422dcde
commit
ff323d46a3
@ -21,8 +21,9 @@ public class AnnotationInvocationHandler implements InvocationHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Object invoke(Object proxy, Method method, Object[] arguments) {
|
public Object invoke(Object proxy, Method method, Object[] arguments) {
|
||||||
|
String name = method.getName();
|
||||||
for (int i = 2; i < data.length; i += 2) {
|
for (int i = 2; i < data.length; i += 2) {
|
||||||
if (method.getName().equals(data[i])) {
|
if (name.equals(data[i])) {
|
||||||
return data[i + 1];
|
return data[i + 1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user