Buggy code:
public abstract class CacheAdd extends AbstractAddStepHandler { private static final Logger log = Logger . getLogger ( CacheAdd . class . getPackage ( ) . getName ( ) ) ; private static final String DEFAULTS = "infinispan-defaults.xml" ; private static volatile Map < CacheMode , Configuration > defaults = null ; public static synchronized Configuration getDefaultConfiguration ( CacheMode cacheMode ) { } private static ConfigurationBuilderHolder load ( String resource ) { } private static URL find ( String resource , ClassLoader ... loaders ) { } final CacheMode mode ; CacheAdd ( CacheMode mode ) { } @ Override protected void populateModel ( ModelNode operation , ModelNode model ) throws OperationFailedException { } @ Override protected void performRuntime ( OperationContext context , ModelNode operation , ModelNode model , ServiceVerificationHandler verificationHandler , List < ServiceController < ? > > newControllers ) throws OperationFailedException { } private < T > void addDependency ( ServiceBuilder < ? > builder , CacheAdd . Dependency < T > dependency ) { } abstract void populateCacheMode ( ModelNode fromModel , ModelNode toModel ) throws OperationFailedException { } void populate ( ModelNode fromModel , ModelNode toModel ) throws OperationFailedException { } void processModelNode ( OperationContext context , String containerName , ModelNode cache , ConfigurationBuilder builder , List < CacheAdd . Dependency < ? > > dependencies ) throws OperationFailedException { } private String findStoreKey ( ModelNode cache ) { } private ModelNode getStoreModelNode ( ModelNode cache ) { } private void buildCacheStore ( OperationContext context , LoaderConfigurationBuilder builder , String containerName , ModelNode store , String storeKey , List < CacheAdd . Dependency < ? > > dependencies ) throws OperationFailedException { final Properties properties = new TypedProperties ( ) ; if ( store . hasDefined ( PROPERTY ) ) { for ( Property property : store . get ( PROPERTY ) . asPropertyList ( ) ) { String propertyName = property . getName ( ) ; Property complexValue = property . getValue ( ) . asProperty ( ) ; String propertyValue = complexValue . getValue ( ) . asString ( ) ; properties . setProperty ( propertyName , propertyValue ) ; } } builder . withProperties ( properties ) ; ModelNode resolvedValue = null ; if ( storeKey . equals ( FILE_STORE ) ) { builder . cacheLoader ( new FileCacheStore ( ) ) ; <START_BUG> final String path = ( ( resolvedValue = PATH . resolveModelAttribute ( context , store ) ) . isDefined ( ) ) ? resolvedValue . asString ( ) : containerName ; <END_BUG> Injector < String > injector = new CacheAdd . SimpleInjector < String > ( ) { @ Override public void inject ( String value ) { StringBuilder location = new StringBuilder ( value ) ; if ( path != null ) { location . append ( File . separatorChar ) . append ( path ) ; } properties . setProperty ( "location" , location . toString ( ) ) ; } } ; final String relativeTo = ( ( resolvedValue = RELATIVE_TO . resolveModelAttribute ( context , store ) ) . isDefined ( ) ) ? resolvedValue . asString ( ) : ServerEnvironment . SERVER_DATA_DIR ; dependencies . add ( new CacheAdd . Dependency < String > ( AbstractPathService . pathNameOf ( relativeTo ) , String . class , injector ) ) ; properties . setProperty ( "fsyncMode" , "perWrite" ) ; } else if ( ( ( storeKey . equals ( STRING_KEYED_JDBC_STORE ) ) || ( storeKey . equals ( BINARY_KEYED_JDBC_STORE ) ) ) || ( storeKey . equals ( MIXED_KEYED_JDBC_STORE ) ) ) { builder . cacheLoader ( this . createJDBCStore ( properties , context , store ) ) ; final String datasource = DATA_SOURCE . resolveModelAttribute ( context , store ) . asString ( ) ; dependencies . add ( new CacheAdd . Dependency < Object > ( JBOSS . append ( "data-source" , datasource ) ) ) ; properties . setProperty ( "datasourceJndiLocation" , datasource ) ; properties . setProperty ( "connectionFactoryClass" , ManagedConnectionFactory . class . getName ( ) ) ; } else if ( storeKey . equals ( REMOTE_STORE ) ) { builder . cacheLoader ( new RemoteCacheStore ( ) ) ; for ( ModelNode server : store . require ( REMOTE_SERVERS ) . asList ( ) ) { String outboundSocketBinding = server . get ( OUTBOUND_SOCKET_BINDING ) . asString ( ) ; Injector < OutboundSocketBinding > injector = new CacheAdd . SimpleInjector < OutboundSocketBinding > ( ) { @ Override public void inject ( OutboundSocketBinding value ) { try { String address = ( ( value . getDestinationAddress ( ) . getHostAddress ( ) ) + ":" ) + ( value . getDestinationPort ( ) ) ; String serverList = properties . getProperty ( "serverList" ) ; properties . setProperty ( "serverList" , ( serverList == null ? address : ( serverList + ";" ) + address ) ) ; } catch ( UnknownHostException e ) { throw MESSAGES . failedToInjectSocketBinding ( e , value ) ; } } } ; dependencies . add ( new CacheAdd . Dependency < OutboundSocketBinding > ( OUTBOUND_SOCKET_BINDING_BASE_SERVICE_NAME . append ( outboundSocketBinding ) , OutboundSocketBinding . class , injector ) ) ; } if ( store . hasDefined ( CACHE ) ) { properties . setProperty ( "remoteCacheName" , store . get ( CACHE ) . asString ( ) ) ; properties . setProperty ( "useDefaultRemoteCache" , Boolean . toString ( false ) ) ; } else { properties . setProperty ( "useDefaultRemoteCache" , Boolean . toString ( true ) ) ; } if ( store . hasDefined ( SOCKET_TIMEOUT ) ) { properties . setProperty ( "soTimeout" , store . require ( SOCKET_TIMEOUT ) . asString ( ) ) ; } if ( store . hasDefined ( TCP_NO_DELAY ) ) { properties . setProperty ( "tcpNoDelay" , store . require ( TCP_NO_DELAY ) . asString ( ) ) ; } }

Fix:
final String path = ( ( resolvedValue = PATH . resolveModelAttribute ( context , store ) ) . isDefined ( ) ) ? resolvedValue . asString ( ) : ( ( InfinispanExtension . SUBSYSTEM_NAME ) + ( File . separatorChar ) ) + containerName ;