summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2010-06-28 12:46:18 -0700
committerShawn O. Pearce <spearce@spearce.org>2010-06-28 12:46:18 -0700
commit242b4026d92c06c45cc10df0c5a8bf5634d85e70 (patch)
treed248abc02b21d604da398f2247c9866c07d3c5f8
parentaa4b06e08781f9f4e33259d92eb919b3c6da22ef (diff)
downloadjgit-242b4026d92c06c45cc10df0c5a8bf5634d85e70.tar.gz
jgit-242b4026d92c06c45cc10df0c5a8bf5634d85e70.zip
Remove volatile keyword from RepositoryEvent
We don't need this field to be volatile. Events are delivered by the same thread that created the RepositoryEvent object, and thus any cross-thread operations would need to be handled by some other type of synchronization in the listener, and that would protect both the repository field and any other per-event data. Change-Id: Iefe345959e1a2d4669709dbf82962bcc1b8913e3 Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/events/RepositoryEvent.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/events/RepositoryEvent.java b/org.eclipse.jgit/src/org/eclipse/jgit/events/RepositoryEvent.java
index fa1b1bd41d..ba1c81d5d8 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/events/RepositoryEvent.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/events/RepositoryEvent.java
@@ -53,7 +53,7 @@ import org.eclipse.jgit.lib.Repository;
* type of listener this event dispatches to.
*/
public abstract class RepositoryEvent<T extends RepositoryListener> {
- private volatile Repository repository;
+ private Repository repository;
/**
* Set the repository this event occurred on.