From 56925a131b04cb7bb064ce7df22005ba458d6d03 Mon Sep 17 00:00:00 2001 From: fullwall Date: Sun, 9 Dec 2012 20:05:55 +0800 Subject: [PATCH] Fix usage of getClass instead of annotationType --- src/main/java/net/citizensnpcs/command/CommandManager.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/net/citizensnpcs/command/CommandManager.java b/src/main/java/net/citizensnpcs/command/CommandManager.java index 9f16288e1..6fd77a8ac 100644 --- a/src/main/java/net/citizensnpcs/command/CommandManager.java +++ b/src/main/java/net/citizensnpcs/command/CommandManager.java @@ -127,7 +127,7 @@ public class CommandManager { methodArgs[0] = context; for (Annotation annotation : registeredAnnotations.get(method)) { - CommandAnnotationProcessor processor = annotationProcessors.get(annotation.getClass()); + CommandAnnotationProcessor processor = annotationProcessors.get(annotation.annotationType()); processor.process(sender, context, annotation, methodArgs); } @@ -356,7 +356,7 @@ public class CommandManager { List annotations = Lists.newArrayList(); for (Annotation annotation : method.getDeclaringClass().getAnnotations()) { - Class annotationClass = annotation.getClass(); + Class annotationClass = annotation.annotationType(); if (annotationProcessors.containsKey(annotationClass)) annotations.add(annotation); } @@ -367,7 +367,7 @@ public class CommandManager { Iterator itr = annotations.iterator(); while (itr.hasNext()) { Annotation previous = itr.next(); - if (previous.getClass() == annotationClass) { + if (previous.annotationType() == annotationClass) { itr.remove(); } }