Make shared variable volatile
authorCarsten Ziegeler <cziegeler@apache.org>
Mon, 5 Jan 2015 11:12:59 +0000 (11:12 +0000)
committerCarsten Ziegeler <cziegeler@apache.org>
Mon, 5 Jan 2015 11:12:59 +0000 (11:12 +0000)
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1649502 13f79535-47bb-0310-9956-ffa450edef68

src/test/java/org/apache/sling/installer/it/ConfigInstallTest.java

index 6ad0496..ac1b7ae 100644 (file)
@@ -49,8 +49,8 @@ public class ConfigInstallTest extends OsgiInstallerTestBase implements Configur
 
     private final static long TIMEOUT = 5000L;
     private final List<ConfigurationEvent> events = new LinkedList<ConfigurationEvent>();
-    private List<ServiceRegistration<?>> serviceRegistrations = new ArrayList<ServiceRegistration<?>>();
-    private int installationEvents = 0;
+    private final List<ServiceRegistration<?>> serviceRegistrations = new ArrayList<ServiceRegistration<?>>();
+    private volatile int installationEvents = 0;
     private static final AtomicInteger counter = new AtomicInteger();
 
     @org.ops4j.pax.exam.Configuration