[jboss-cvs] JBossAS SVN: r94879 - projects/jboss-cl/branches/Branch_2_0/classloader/src/main/java/org/jboss/classloader/spi/base.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Oct 14 12:50:46 EDT 2009
Author: adrian at jboss.org
Date: 2009-10-14 12:50:46 -0400 (Wed, 14 Oct 2009)
New Revision: 94879
Modified:
projects/jboss-cl/branches/Branch_2_0/classloader/src/main/java/org/jboss/classloader/spi/base/ClassLoadingTask.java
Log:
[JBCL-123] - Use volatile instead of AtomicReference.
Modified: projects/jboss-cl/branches/Branch_2_0/classloader/src/main/java/org/jboss/classloader/spi/base/ClassLoadingTask.java
===================================================================
--- projects/jboss-cl/branches/Branch_2_0/classloader/src/main/java/org/jboss/classloader/spi/base/ClassLoadingTask.java 2009-10-14 16:48:47 UTC (rev 94878)
+++ projects/jboss-cl/branches/Branch_2_0/classloader/src/main/java/org/jboss/classloader/spi/base/ClassLoadingTask.java 2009-10-14 16:50:46 UTC (rev 94879)
@@ -27,7 +27,6 @@
import java.security.CodeSource;
import java.security.PrivilegedAction;
import java.security.ProtectionDomain;
-import java.util.concurrent.atomic.AtomicReference;
import org.jboss.classloader.plugins.ClassLoaderUtils;
import org.jboss.classloader.spi.Loader;
@@ -73,7 +72,7 @@
private ClassLoader classLoader;
/** The loaded class */
- private AtomicReference<Class<?>> loadedClass = new AtomicReference<Class<?>>();
+ private volatile Class<?> loadedClass;
/** The error during the load */
private Throwable loadException;
@@ -121,7 +120,7 @@
*/
Class<?> getLoadedClass()
{
- return loadedClass.get();
+ return loadedClass;
}
/**
@@ -171,7 +170,7 @@
*/
synchronized void finish(Class<?> loadedClass)
{
- this.loadedClass.set(loadedClass);
+ this.loadedClass = loadedClass;
state = TaskState.FINISHED;
}
@@ -312,7 +311,7 @@
// Accept the first class
if (theClass != null && loadedClass == null)
- this.loadedClass.set(theClass);
+ this.loadedClass = theClass;
}
/**
@@ -360,7 +359,7 @@
*/
Class<?> getLoadedClass()
{
- return loadedClass.get();
+ return loadedClass;
}
@Override
More information about the jboss-cvs-commits
mailing list