felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1693695 - in /felix/trunk: ./ coordinator/ coordinator/src/main/java/org/apache/felix/coordinator/impl/ coordinator/src/test/java/org/apache/felix/coordinator/impl/ javax.servlet/ org.osgi.compendium/ org.osgi.core/ org.osgi.foundation/
Date Sat, 01 Aug 2015 09:42:48 GMT
Author: cziegeler
Date: Sat Aug  1 09:42:47 2015
New Revision: 1693695

URL: http://svn.apache.org/r1693695
Log:
Remove obsolete modules for R4 (core, foundation, compendium) and javax.servlet 2.1

Removed:
    felix/trunk/javax.servlet/
    felix/trunk/org.osgi.compendium/
    felix/trunk/org.osgi.core/
    felix/trunk/org.osgi.foundation/
Modified:
    felix/trunk/.DS_Store
    felix/trunk/coordinator/pom.xml
    felix/trunk/coordinator/src/main/java/org/apache/felix/coordinator/impl/CoordinationImpl.java
    felix/trunk/coordinator/src/test/java/org/apache/felix/coordinator/impl/CoordinatorImplTest.java
    felix/trunk/pom.xml

Modified: felix/trunk/.DS_Store
URL: http://svn.apache.org/viewvc/felix/trunk/.DS_Store?rev=1693695&r1=1693694&r2=1693695&view=diff
==============================================================================
Binary files felix/trunk/.DS_Store (original) and felix/trunk/.DS_Store Sat Aug  1 09:42:47
2015 differ

Modified: felix/trunk/coordinator/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/coordinator/pom.xml?rev=1693695&r1=1693694&r2=1693695&view=diff
==============================================================================
--- felix/trunk/coordinator/pom.xml (original)
+++ felix/trunk/coordinator/pom.xml Sat Aug  1 09:42:47 2015
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.felix</groupId>
         <artifactId>felix-parent</artifactId>
-        <version>2.1</version>
+        <version>3</version>
         <relativePath>../pom/pom.xml</relativePath>
     </parent>
 
@@ -44,13 +44,6 @@
     <build>
         <plugins>
             <plugin>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>5</source>
-                    <target>jsr14</target>
-                </configuration>
-            </plugin>
-            <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
                 <extensions>true</extensions>

Modified: felix/trunk/coordinator/src/main/java/org/apache/felix/coordinator/impl/CoordinationImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/coordinator/src/main/java/org/apache/felix/coordinator/impl/CoordinationImpl.java?rev=1693695&r1=1693694&r2=1693695&view=diff
==============================================================================
--- felix/trunk/coordinator/src/main/java/org/apache/felix/coordinator/impl/CoordinationImpl.java
(original)
+++ felix/trunk/coordinator/src/main/java/org/apache/felix/coordinator/impl/CoordinationImpl.java
Sat Aug  1 09:42:47 2015
@@ -58,7 +58,7 @@ public class CoordinationImpl implements
 
     private final String name;
 
-    private long deadLine;
+    private volatile long deadLine;
 
     /**
      * Access to this field must be synchronized as long as the expected state
@@ -68,15 +68,17 @@ public class CoordinationImpl implements
      */
     private volatile State state;
 
-    private Throwable failReason;
+    private volatile Throwable failReason;
 
     private final ArrayList<Participant> participants;
 
     private final Map<Class<?>, Object> variables;
 
-    private TimerTask timeoutTask;
+    private volatile TimerTask timeoutTask;
 
-    private Thread associatedThread;
+    private volatile Thread associatedThread;
+
+    private volatile CoordinationHolder threadAssociatedRef;
 
     private final Object waitLock = new Object();
 
@@ -537,8 +539,17 @@ public class CoordinationImpl implements
 		return id == other.id;
 	}
 
-	void setAssociatedThread(final Thread t) {
+	void setAssociatedThread(final Thread t)
+	{
 	    this.associatedThread = t;
+	    if ( t != null )
+	    {
+	        this.threadAssociatedRef = this.holderRef.get();
+	    }
+	    else
+	    {
+	        this.threadAssociatedRef = null;
+	    }
 	}
 
     public Coordination getHolder() {

Modified: felix/trunk/coordinator/src/test/java/org/apache/felix/coordinator/impl/CoordinatorImplTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/coordinator/src/test/java/org/apache/felix/coordinator/impl/CoordinatorImplTest.java?rev=1693695&r1=1693694&r2=1693695&view=diff
==============================================================================
--- felix/trunk/coordinator/src/test/java/org/apache/felix/coordinator/impl/CoordinatorImplTest.java
(original)
+++ felix/trunk/coordinator/src/test/java/org/apache/felix/coordinator/impl/CoordinatorImplTest.java
Sat Aug  1 09:42:47 2015
@@ -126,6 +126,16 @@ public class CoordinatorImplTest extends
         assertNull(coordinator.peek());
     }
 
+    /**
+     * Regression test for FELIX-4976
+     */
+    public void test_coordinationOrphanedBug()
+    {
+        coordinator.begin("test", 0);
+        System.gc();
+        coordinator.pop().end();
+    }
+
     public void test_beginCoordination_stack()
     {
         final String name = "test";

Modified: felix/trunk/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/pom.xml?rev=1693695&r1=1693694&r2=1693695&view=diff
==============================================================================
--- felix/trunk/pom.xml (original)
+++ felix/trunk/pom.xml Sat Aug  1 09:42:47 2015
@@ -94,10 +94,6 @@
         </property>
       </activation>
       <modules>        
-        <module>org.osgi.foundation</module>
-        <module>javax.servlet</module>
-        <module>org.osgi.core</module>
-        <module>org.osgi.compendium</module>
         <module>resolver</module>
         <module>framework</module>
         <module>main</module>



Mime
View raw message