throw exception for annotated members

This commit is contained in:
fjy 2013-09-16 17:36:31 -07:00
parent cabae7993d
commit 64f3821b4e
1 changed files with 4 additions and 0 deletions

View File

@ -3,6 +3,7 @@ package com.fasterxml.jackson.databind.introspect;
import com.fasterxml.jackson.annotation.JacksonInject; import com.fasterxml.jackson.annotation.JacksonInject;
import com.google.inject.BindingAnnotation; import com.google.inject.BindingAnnotation;
import com.google.inject.Key; import com.google.inject.Key;
import com.metamx.common.IAE;
import java.lang.annotation.Annotation; import java.lang.annotation.Annotation;
@ -26,6 +27,9 @@ public class GuiceAnnotationIntrospector extends NopAnnotationIntrospector
} }
if (guiceAnnotation == null) { if (guiceAnnotation == null) {
if (m instanceof AnnotatedMethod) {
throw new IAE("Annotated methods don't work very well yet...");
}
return Key.get(m.getGenericType()); return Key.get(m.getGenericType());
} }
return Key.get(m.getGenericType(), guiceAnnotation); return Key.get(m.getGenericType(), guiceAnnotation);