Buggy code:
@ SuppressWarnings ( { "rawtypes" , "unchecked" } ) public class InjectUtil { private static final Logger logger = LoggerFactory . getLogger ( InjectUtil . class ) ; private static final String ContextDataSetSingletonMapKey = "ContextDataSetSingletonMapKey#" + ( InjectUtil . class . getName ( ) ) ; public static final String ContextDataNotFoundScope = "#ContextDataNotFoundScope" ; public static final String ContextDataTypeUnMatchScope = "#ContextDataTypeUnMatchScope" ; private static class TargetInfo { AnnotatedPropertyInfo propertyInfo ; String name ; String scope ; TypeUnMacthPolicy typeUnMatch ; ContextDataSetFactory contextDataSetFactory ; boolean isContextDataSetSingletonInContext ; Class < ? > type ; boolean isContextDataHolder ; Object defaultValue ; void fixForPrimitiveType ( ) { } ContextDataHolder createDataHolderInstance ( ) throws IllegalAccessException , InstantiationException { } } private static class MethodInfo extends InjectUtil . TargetInfo { Method method ; } private static class FieldInfo extends InjectUtil . TargetInfo { Field field ; } private static class InstanceWireTarget { List < InjectUtil . FieldInfo > setFieldList = new ArrayList < > ( ) ; List < InjectUtil . FieldInfo > getFieldList = new ArrayList < > ( ) ; List < InjectUtil . MethodInfo > setMethodList = new ArrayList < > ( ) ; List < InjectUtil . MethodInfo > getMethodList = new ArrayList < > ( ) ; } private static final ConcurrentHashMap < String , InjectUtil . InstanceWireTarget > InstanceTargetCache = new ConcurrentHashMap < > ( ) ; private static final ConcurrentHashMap < Method , List < InjectUtil . TargetInfo > > MethodTargetCache = new ConcurrentHashMap < > ( ) ; private static final Paranamer paranamer = new AdaptiveParanamer ( ) ; public static final Object retrieveContextDataSetInstance ( Class cls , String searchName , String searchScope ) throws DataOperationException { } public static final void injectToInstance ( Object instance ) throws DataOperationException { } private static void handleTypeUnMatch ( Object instance , InjectUtil . FieldInfo target , ContextDataHolder valueHolder ) throws DataOperationException { } private static void handleTypeUnMatch ( Object instance , InjectUtil . MethodInfo target , ContextDataHolder valueHolder ) throws DataOperationException { } private static void handleTypeUnMatch ( Method method , int methodParameterIndex , InjectUtil . TargetInfo target , ContextDataHolder valueHolder ) throws DataOperationException { } private static void handleTypeUnMatch ( Object instance , Field field , Method setter , Method method , int methodParameterIndex , InjectUtil . TargetInfo target , ContextDataHolder valueHolder ) throws DataOperationException { } private static void transferDataHolder ( ContextDataHolder from , ContextDataHolder to ) { } private static ContextDataHolder findValueForTarget ( InjectUtil . TargetInfo targetInfo , Class overrideSearchType ) throws DataOperationException { } @ Deprecated public static final void setContextDataFromInstance ( Object instance ) throws DataOperationException { } private static final InjectUtil . InstanceWireTarget getInstanceTarget ( Object instance ) throws DataOperationException { } private static final InjectUtil . InstanceWireTarget createInstanceTarget ( Object instance ) throws DataOperationException { } public static final Object [ ] getMethodInjectParams ( Method method ) throws DataOperationException { } public static final Object [ ] getMethodInjectParams ( Method method , ContextDataFinder dataFinder ) throws DataOperationException { } private static final List < InjectUtil . TargetInfo > getMethodTarget ( Method method ) throws IllegalAccessException , InstantiationException { } private static final List < InjectUtil . TargetInfo > createMethodTarget ( Method method ) throws IllegalAccessException , InstantiationException { Class < ? > [ ] types = method . getParameterTypes ( ) ; List < InjectUtil . TargetInfo > targetList = new ArrayList < > ( ) ; if ( ( types . length ) == 0 ) { return targetList ; } Annotation [ ] [ ] annotations = method . getParameterAnnotations ( ) ; String [ ] parameterNames = InjectUtil . paranamer . lookupParameterNames ( method ) ; InjectUtil . TargetInfo target ; ContextData cd ; ContextDataSet cdSet ; for ( int i = 0 ; i < ( types . length ) ; i ++ ) { target = new InjectUtil . TargetInfo ( ) ; target . type = types [ i ] ; target . isContextDataHolder = ContextDataHolder . class . isAssignableFrom ( target . type ) ; cd = ConvertableAnnotationRetriever . retrieveAnnotation ( ContextData . class , annotations [ i ] ) ; cdSet = ConvertableAnnotationRetriever . retrieveAnnotation ( ContextDataSet . class , target . type . getAnnotations ( ) ) ; target . name = ( cd == null ) ? "" : cd . name ( ) ; target . scope = ( cd == null ) ? "" : cd . scope ( ) ; <START_BUG> target . typeUnMatch = ( cd == null ) ? TypeUnMacthPolicy . DEFAULT_VALUE : cd . typeUnMatch ( ) ; <END_BUG> if ( StringUtils . isEmpty ( target . name ) ) { target . name = parameterNames [ i ] ; } if ( cdSet == null ) { target . contextDataSetFactory = null ; } else { target . contextDataSetFactory = cdSet . factory ( ) . newInstance ( ) ; target . isContextDataSetSingletonInContext = cdSet . singletonInContext ( ) ; } target . fixForPrimitiveType ( ) ; targetList . add ( target ) ; } return targetList ; } public static final void initContext ( Context context ) { } }

Fix:
target . typeUnMatch = ( cd == null ) ? TypeUnMacthPolicy . EXCEPTION : cd . typeUnMatch ( ) ;