[jboss-cvs] JBossAS SVN: r94875 - in projects/jboss-cl/trunk: classloader/src/main/java/org/jboss/classloader/spi/filter and 7 other directories.
David M. Lloyd
david.lloyd at redhat.com
Wed Oct 14 12:07:19 EDT 2009
On 10/14/2009 11:01 AM, jboss-cvs-commits at lists.jboss.org wrote:
> Author: adrian at jboss.org
> Date: 2009-10-14 12:01:45 -0400 (Wed, 14 Oct 2009)
> New Revision: 94875
> Modified: projects/jboss-cl/trunk/classloader/src/main/java/org/jboss/classloader/spi/base/ClassLoadingTask.java
> ===================================================================
> --- projects/jboss-cl/trunk/classloader/src/main/java/org/jboss/classloader/spi/base/ClassLoadingTask.java 2009-10-14 15:23:40 UTC (rev 94874)
> +++ projects/jboss-cl/trunk/classloader/src/main/java/org/jboss/classloader/spi/base/ClassLoadingTask.java 2009-10-14 16:01:45 UTC (rev 94875)
> @@ -27,6 +27,7 @@
> import java.security.CodeSource;
> import java.security.PrivilegedAction;
> import java.security.ProtectionDomain;
> +import java.util.concurrent.atomic.AtomicReference;
[..]
> + return loadedClass.get();
[..]
> + this.loadedClass.set(loadedClass);
[..]
> + Class<?> loadedClass = getLoadedClass();
[..]
> + Class<?> loadedClass = getLoadedClass();
[..]
> + this.loadedClass.set(theClass);
[..]
> + return loadedClass.get();
[..]
> + Class<?> loadedClass = getLoadedClass();
If you only do get & set, might as well just make it volatile instead of
using AtomicReference, and save a bit of memory.
- DML
More information about the jboss-cvs-commits
mailing list