question: @ Override public String replacePath ( String inputURI ) { if ( LOGGER . isDebugEnabled ( ) ) { LOGGER . debug ( "About to filter: " + inputURI ) ; } if ( inputURI . contains ( TemporaryDirectoryManager . DIRECTORY_TEMPLATE ) ) { synchronized ( LOCK ) { initialiseDirectory ( ) ; String [ ] components = inputURI . split ( "[:;]" ) ; for ( String component : components ) { if ( component . contains ( DIRECTORY_TEMPLATE ) ) { if ( LOGGER . isDebugEnabled ( ) ) { LOGGER . debug ( "Component of URL: " + component ) ; LOGGER . debug ( "temporaryDirectoryName: " + temporaryDirectoryName ) ; } String prefix = component . substring ( 0 , component . indexOf ( DIRECTORY_TEMPLATE ) ) ; if ( LOGGER . isDebugEnabled ( ) ) { LOGGER . debug ( "prefix: " + prefix ) ; } File temporaryDirectory = new File ( prefix , temporaryDirectoryName ) ; if ( ! createdDirectories . contains ( temporaryDirectory . getPath ( ) ) ) { if ( ! temporaryDirectory . exists ( ) ) { if ( ! temporaryDirectory . mkdirs ( ) ) { throw new IllegalStateException ( "Directory " + temporaryDirectory + " could not be created while configuring " + inputURI ) ; } else { createdDirectories . add ( temporaryDirectory . getPath ( ) ) ; } } else { createdDirectories . add ( temporaryDirectory . getPath ( ) ) ; } } } } } final String modifiedInputURI = inputURI . replace ( TemporaryDirectoryManager . DIRECTORY_TEMPLATE , temporaryDirectoryName ) ; if ( LOGGER . isDebugEnabled ( ) ) { LOGGER . debug ( "modifiedInputURI: " + modifiedInputURI ) ; } return modifiedInputURI ; } return inputURI ; }
target:  This method replaces (if found) the sub-string [TEMP] in any input String with the value determined by the implementation of this interface. <p/> TODO: There is a possibility of a race condition where two separate processes (JVMs) are attempting to create the same directory name simultaneously.  This needs to be addressed.