Skip to content

Commit 913cb00

Browse files
committed
Javadoc
1 parent f207d5d commit 913cb00

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/main/java/org/apache/commons/io/FileCleaner.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,14 @@
2525
* This utility creates a background thread to handle file deletion.
2626
* Each file to be deleted is registered with a handler object.
2727
* When the handler object is garbage collected, the file is deleted.
28+
* </p>
2829
* <p>
2930
* In an environment with multiple class loaders (a servlet container, for
3031
* example), you should consider stopping the background thread if it is no
3132
* longer needed. This is done by invoking the method
3233
* {@link #exitWhenFinished}, typically in
3334
* {@code javax.servlet.ServletContextListener.contextDestroyed(javax.servlet.ServletContextEvent)} or similar.
35+
* </p>
3436
*
3537
* @deprecated Use {@link FileCleaningTracker}
3638
*/
@@ -51,18 +53,21 @@ public class FileCleaner {
5153
* with multiple class loaders (such as an application server), you should be
5254
* aware that the file cleaner thread will continue running even if the class
5355
* loader it was started from terminates. This can constitute a memory leak.
56+
* </p>
5457
* <p>
5558
* For example, suppose that you have developed a web application, which
5659
* contains the Commons IO jar file in your WEB-INF/lib directory. In other
5760
* words, the FileCleaner class is loaded through the class loader of your
5861
* web application. If the web application is terminated, but the servlet
5962
* container is still running, then the file cleaner thread will still exist,
6063
* posing a memory leak.
64+
* </p>
6165
* <p>
6266
* This method allows the thread to be terminated. Simply call this method
6367
* in the resource cleanup code, such as
6468
* {@code javax.servlet.ServletContextListener.contextDestroyed(javax.servlet.ServletContextEvent)}.
6569
* One called, no new objects can be tracked by the file cleaner.
70+
* </p>
6671
*
6772
* @deprecated Use {@link FileCleaningTracker#exitWhenFinished()}.
6873
*/

0 commit comments

Comments
 (0)