Buggy code:
public class JPAAnnotationParseProcessor implements DeploymentUnitProcessor { private static final DotName PERSISTENCE_CONTEXT_ANNOTATION_NAME = DotName . createSimple ( PersistenceContext . class . getName ( ) ) ; private static final DotName PERSISTENCE_UNIT_ANNOTATION_NAME = DotName . createSimple ( PersistenceUnit . class . getName ( ) ) ; private static final String ENTITY_MANAGER_CLASS = "javax.persistence.EntityManager" ; private static final String ENTITY_MANAGERFACTORY_CLASS = "javax.persistence.EntityManagerFactory" ; @ Override public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { } @ Override public void undeploy ( DeploymentUnit context ) { } private void processPersistenceAnnotations ( final DeploymentUnit deploymentUnit , final EEModuleDescription eeModuleDescription , List < AnnotationInstance > persistenceContexts ) throws DeploymentUnitProcessingException { } private void processField ( final DeploymentUnit deploymentUnit , final AnnotationInstance annotation , final FieldInfo fieldInfo , final EEModuleClassDescription eeModuleClassDescription ) throws DeploymentUnitProcessingException { final String fieldName = fieldInfo . name ( ) ; final AnnotationValue declaredNameValue = annotation . value ( "name" ) ; final String declaredName = ( declaredNameValue != null ) ? declaredNameValue . asString ( ) : null ; final String localContextName ; if ( ( declaredName == null ) || ( declaredName . isEmpty ( ) ) ) { localContextName = fieldName ; } else { localContextName = declaredName ; } final DotName declaredTypeDotName = fieldInfo . type ( ) . name ( ) ; final DotName injectionTypeDotName = ( ( declaredTypeDotName == null ) || ( declaredTypeDotName . toString ( ) . equals ( Object . class . getName ( ) ) ) ) ? fieldInfo . type ( ) . name ( ) : declaredTypeDotName ; final String injectionType = injectionTypeDotName . toString ( ) ; final InjectionSource bindingSource = this . getBindingSource ( deploymentUnit , annotation , injectionType ) ; final BindingConfiguration bindingConfiguration = new BindingConfiguration ( localContextName , bindingSource ) ; eeModuleClassDescription . getConfigurators ( ) . add ( new ClassConfigurator ( ) { @ Override public void configure ( DeploymentPhaseContext context , EEModuleClassDescription description , EEModuleClassConfiguration configuration ) throws DeploymentUnitProcessingException { configuration . getBindingConfigurations ( ) . add ( bindingConfiguration ) ; } } ) ; <START_BUG> final InjectionTarget injectionTarget = new org . jboss . as . ee . component . FieldInjectionTarget ( fieldName , fieldInfo . declaringClass ( ) . name ( ) . toString ( ) , fieldInfo . type ( ) . name ( ) . toString ( ) ) ; <END_BUG> final InjectionSource injectionSource = new LookupInjectionSource ( localContextName ) ; final ResourceInjectionConfiguration injectionConfiguration = new ResourceInjectionConfiguration ( injectionTarget , injectionSource ) ; eeModuleClassDescription . getConfigurators ( ) . add ( new ClassConfigurator ( ) { @ Override public void configure ( DeploymentPhaseContext context , EEModuleClassDescription description , EEModuleClassConfiguration configuration ) throws DeploymentUnitProcessingException { configuration . getInjectionConfigurations ( ) . add ( injectionConfiguration ) ; } } ) ; } private void processMethod ( final DeploymentUnit deploymentUnit , final AnnotationInstance annotation , final MethodInfo methodInfo , final EEModuleClassDescription eeModuleClassDescription ) throws DeploymentUnitProcessingException { } private void processClass ( final DeploymentUnit deploymentUnit , final AnnotationInstance annotation , final ClassInfo classInfo , final EEModuleClassDescription eeModuleClassDescription ) throws DeploymentUnitProcessingException { } private InjectionSource getBindingSource ( final DeploymentUnit deploymentUnit , final AnnotationInstance annotation , String injectionTypeName ) throws DeploymentUnitProcessingException { } private boolean isExtendedPersistenceContext ( final AnnotationInstance annotation ) { } private boolean isPersistenceContext ( final AnnotationInstance annotation ) { } private String getClassLevelInjectionType ( final AnnotationInstance annotation ) { } private String getScopedPuName ( final DeploymentUnit deploymentUnit , final AnnotationInstance annotation ) throws DeploymentUnitProcessingException { } private ServiceName getPuServiceName ( String scopedPuName ) throws DeploymentUnitProcessingException { } private void registerInterceptorsForExtendedPersistenceContext ( ComponentDescription componentDescription , AnnotationInstance annotation ) { } }

Fix:
final InjectionTarget injectionTarget = new org . jboss . as . ee . component . FieldInjectionTarget ( fieldInfo . declaringClass ( ) . name ( ) . toString ( ) , fieldName , fieldInfo . type ( ) . name ( ) . toString ( ) ) ;