From
RHQ-586
Other tree-walking:
* org.rhq.core.pluginapi.util.FileUtils.purge() may also need symlink protection. In this case we probably don't want to follow symlinks, just delete them.
* org.rhq.enterprise.server.plugin.content.ContentSourcePluginClassLoader may need it for its (near duplicate) purge method.
* ServerInformation in the installer also recursively walks dir trees but I think this is safe since we're under control of the file structure being worked on.
I don't want to make changes here given the proximity of the 2.0.1 release and the fact that this code is not tied to any reported issues. It should be addressed soon after release.
No code change, updated FileUtils.purge() jdoc to mention that it does not provide protection against symbolic links. This should be ok for all of the uses I see in our code. It is dangerous for recursive delete/purge/other operations to follow symbolic links on unix, so if working on an uncontrolled/unknown directory, symbolic links handling should be performed. Probably most likely in plugin code.