소스 검색

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>
tags/v0.9.1
Shawn O. Pearce 14 년 전
부모
커밋
242b4026d9
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1
    1
      org.eclipse.jgit/src/org/eclipse/jgit/events/RepositoryEvent.java

+ 1
- 1
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.

Loading…
취소
저장