dongjinleekr commented on pull request #9414:
URL: https://github.com/apache/kafka/pull/9414#issuecomment-707498871


   Hi @vvcephei,
   
   1. Sure. I added some validations in `StateDirectoryTest`.
   
     - If `StateDirectory#clean` is called, the empty `appDir` is also deleted. 
(see `StateDirectoryTest#shouldLogManualUserCallMessage`.)
     - If `StateDirectory#clean` is not called, the global state directory and 
it parent, `appDir` is not deleted. (see 
`StateDirectoryTest#shouldLogStateDirCleanerMessage`.)
   
       Please note the difference in 
`StateDirectoryTest#shouldCleanupAllTaskDirectoriesIncludingGlobalOne`; the 
`appDir` was an empty directory before but it is now deleted.
   
   2. Since the goal of this modification is deleting the empty directory, we 
don't need a recursive delete; it is also why I called `File#delete` here, 
since it works and returns `true` iff the target directory is empty.
   
   And one more thing: I added an exception handling for `SecurityException`. 
:smile:


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to