[jboss-cvs] jbosstest/src/main/org/jboss/test/classloader/interrupt ...
Scott Stark
scott.stark at jboss.com
Thu Jul 20 22:57:49 EDT 2006
User: starksm
Date: 06/07/20 22:57:49
Modified: src/main/org/jboss/test/classloader/interrupt Tag:
Branch_4_0 TestThread.java
Log:
Just check that the thread was interrupted going into the class loading call to avoid logging side-effect clearing the interrupt flag.
Revision Changes Path
No revision
No revision
1.3.6.3 +4 -2 jbosstest/src/main/org/jboss/test/classloader/interrupt/TestThread.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: TestThread.java
===================================================================
RCS file: /cvsroot/jboss/jbosstest/src/main/org/jboss/test/classloader/interrupt/TestThread.java,v
retrieving revision 1.3.6.2
retrieving revision 1.3.6.3
diff -u -b -r1.3.6.2 -r1.3.6.3
--- TestThread.java 29 Oct 2005 05:04:39 -0000 1.3.6.2
+++ TestThread.java 21 Jul 2006 02:57:49 -0000 1.3.6.3
@@ -26,7 +26,7 @@
/** A thread subclass that loads a class while its interrupted flag is set.
*
* @author Scott.Stark at jboss.org
- * @version $Revision: 1.3.6.2 $
+ * @version $Revision: 1.3.6.3 $
*/
public class TestThread extends Thread
{
@@ -50,9 +50,11 @@
{
// An explict reference to TestClass will invoke loadClassInternal
log.debug("Creating TestClass");
+ this.interrupt();
+ boolean wasInterrupted = this.isInterrupted();
TestClass tc = new TestClass();
log.debug("TestClass instance = "+tc);
- if( this.isInterrupted() == false )
+ if( wasInterrupted == false )
ex = new IllegalStateException("Interrupted state not restore after loadClassInternal");
}
catch(Throwable e)
More information about the jboss-cvs-commits
mailing list