Buggy code:
public class PoolConfigurationRWHandler { static final String [ ] NO_LOCATION = new String [ 0 ] ; public static final List < String > ATTRIBUTES = Arrays . asList ( Constants . MAX_POOL_SIZE . getName ( ) , Constants . MIN_POOL_SIZE . getName ( ) , Constants . BLOCKING_TIMEOUT_WAIT_MILLIS . getName ( ) , Constants . IDLETIMEOUTMINUTES . getName ( ) , Constants . BACKGROUNDVALIDATION . getName ( ) , Constants . BACKGROUNDVALIDATIONMILLIS . getName ( ) , Constants . POOL_PREFILL . getName ( ) , Constants . POOL_USE_STRICT_MIN . getName ( ) , Constants . POOL_FLUSH_STRATEGY . getName ( ) ) ; public static class PoolConfigurationReadHandler implements OperationStepHandler { public static PoolConfigurationRWHandler . PoolConfigurationReadHandler INSTANCE = new PoolConfigurationRWHandler . PoolConfigurationReadHandler ( ) ; public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { } } public abstract static class PoolConfigurationWriteHandler extends AbstractWriteAttributeHandler < List < PoolConfiguration > > { static final ModelTypeValidator intValidator = new ModelTypeValidator ( ModelType . INT ) ; static final ModelTypeValidator longValidator = new ModelTypeValidator ( ModelType . LONG ) ; static final ModelTypeValidator boolValidator = new ModelTypeValidator ( ModelType . BOOLEAN ) ; private static ParameterValidator getValidator ( String attributeName ) throws OperationFailedException { } protected PoolConfigurationWriteHandler ( ) { } @ Override protected boolean applyUpdateToRuntime ( final OperationContext context , final ModelNode operation , final String parameterName , final ModelNode newValue , final ModelNode currentValue , final HandbackHolder < List < PoolConfiguration > > handbackHolder ) throws OperationFailedException { final PathAddress address = PathAddress . pathAddress ( operation . require ( OP_ADDR ) ) ; final String jndiName = address . getLastElement ( ) . getValue ( ) ; <START_BUG> final ServiceController < ? > managementRepoService = context . getServiceRegistry ( false ) . getService ( MANAGEMENT_REPOSISTORY_SERVICE ) ; <END_BUG> List < PoolConfiguration > poolConfigs = null ; if ( managementRepoService != null ) { try { final ManagementRepository repository = ( ( ManagementRepository ) ( managementRepoService . getValue ( ) ) ) ; poolConfigs = getMatchingPoolConfigs ( jndiName , repository ) ; updatePoolConfigs ( poolConfigs , parameterName , newValue ) ; handbackHolder . setHandback ( poolConfigs ) ; } catch ( Exception e ) { throw new OperationFailedException ( new ModelNode ( ) . set ( ConnectorMessages . MESSAGES . failedToSetAttribute ( e . getLocalizedMessage ( ) ) ) ) ; } } return ( ( ( Constants . IDLETIMEOUTMINUTES . getName ( ) . equals ( parameterName ) ) || ( Constants . BACKGROUNDVALIDATION . getName ( ) . equals ( parameterName ) ) ) || ( Constants . BACKGROUNDVALIDATIONMILLIS . getName ( ) . equals ( parameterName ) ) ) || ( Constants . POOL_PREFILL . getName ( ) . equals ( parameterName ) ) ; } @ Override protected void revertUpdateToRuntime ( OperationContext context , ModelNode operation , String parameterName , ModelNode valueToRestore , ModelNode valueToRevert , List < PoolConfiguration > handback ) throws OperationFailedException { } @ Override protected void validateUnresolvedValue ( String attributeName , ModelNode unresolvedValue ) throws OperationFailedException { } @ Override protected void validateResolvedValue ( String attributeName , ModelNode resolvedValue ) throws OperationFailedException { } private void updatePoolConfigs ( List < PoolConfiguration > poolConfigs , String parameterName , ModelNode newValue ) { } protected abstract List < PoolConfiguration > getMatchingPoolConfigs ( String jndiName , ManagementRepository repository ) { } } public static class LocalAndXaDataSourcePoolConfigurationWriteHandler extends PoolConfigurationRWHandler . PoolConfigurationWriteHandler { public static PoolConfigurationRWHandler . LocalAndXaDataSourcePoolConfigurationWriteHandler INSTANCE = new PoolConfigurationRWHandler . LocalAndXaDataSourcePoolConfigurationWriteHandler ( ) ; protected LocalAndXaDataSourcePoolConfigurationWriteHandler ( ) { } protected List < PoolConfiguration > getMatchingPoolConfigs ( String jndiName , ManagementRepository repository ) { } } public static class RaPoolConfigurationWriteHandler extends PoolConfigurationRWHandler . PoolConfigurationWriteHandler { public static PoolConfigurationRWHandler . RaPoolConfigurationWriteHandler INSTANCE = new PoolConfigurationRWHandler . RaPoolConfigurationWriteHandler ( ) ; protected RaPoolConfigurationWriteHandler ( ) { } protected List < PoolConfiguration > getMatchingPoolConfigs ( String jndiName , ManagementRepository repository ) { } } }

Fix:
final ServiceController < ? > managementRepoService = context . getServiceRegistry ( false ) . getService ( MANAGEMENT_REPOSITORY_SERVICE ) ;