Skip to content

Commit 7c938e4

Browse files
committed
Update ClassLoaderFacet JavaDoc
1 parent 26232ed commit 7c938e4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

projects/api/src/main/java/org/jboss/forge/addon/projects/facets/ClassLoaderFacet.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121
public interface ClassLoaderFacet extends ProjectFacet
2222
{
2323
/**
24-
* Returns the {@link URLClassLoader} with the {@link URL}s that this project depends on.
24+
* Returns a {@link URLClassLoader} that encompasses all {@link Dependency} instances on which this project depends. This is the equivalent of class-loading the entire project classpath.
2525
*
26-
* WARNING: Remember to close this {@link URLClassLoader} when no longer in use.
26+
* WARNING: You *MUST* call {@link URLClassLoader#close()} when finished with this object. Failure to close this object upon completion will result in fatal memory leaks over time. If the scope of work is appropriate, consider using a try-with-resources block to encapsulate the operations and automatically clean up any ClassLoader resources.
2727
* <p/>
28-
* Leaving it open could introduce memory leaks.
28+
* IMPORTANT: You must also clean up and release any {@link Class} references that were produced by this {@link ClassLoader}. It is not enough to close this. Held {@link Class} references will keep the {@link ClassLoader} from being garbage collected.
2929
*/
3030
URLClassLoader getClassLoader();
3131

0 commit comments

Comments
 (0)