question: public static void deleteUserFromAuthenticationInfo ( AuthenticationInfo authenticationInfo ) throws ServerRuntimeException { String username = authenticationInfo . getUsername ( ) ; String passwordFileLocation = authenticationInfo . getPasswordFileLocation ( ) ; try { PropertiesConfiguration props = new PropertiesConfiguration ( passwordFileLocation ) ; String usernameInFile = props . getString ( username ) ; if ( usernameInFile == null ) { throw new ServerRuntimeException ( MessageFormat . format ( "Username does not exist: {0}" , username ) ) ; } props . clearProperty ( username ) ; props . save ( ) ; } catch ( org . apache . commons . configuration . ConfigurationException ce ) { logger . error ( "Error while saving properties for file:" + authenticationInfo . getPasswordFileLocation ( ) , ce ) ; throw new ServerRuntimeException ( "Error while saving Credentials: " + ce . getMessage ( ) ) ; } }
target:  Delete a user and password from a file