Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Keppler2018-04-05 12:36:03 -0400
committerThomas Wolf2018-04-24 04:29:17 -0400
commitc5e521e971f4893d461f30afe6e64a861636a32e (patch)
treee147b9516f547b518212fe3f8578152258c8e24b /org.eclipse.egit.ui.test/src
parent713c46f7c0f4c2e37cfa175a08cb54e9fbdf6620 (diff)
downloadegit-c5e521e971f4893d461f30afe6e64a861636a32e.tar.gz
egit-c5e521e971f4893d461f30afe6e64a861636a32e.tar.xz
egit-c5e521e971f4893d461f30afe6e64a861636a32e.zip
Silence unusual equals() argument type warnings
Since Oxygen the compiler can show a warning for non fitting equals argument types. This change silences the warnings by masking out the runtime type. Change-Id: I0c6900cbfbdb133765e4fa6801c73e3f3fe01531 Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de>
Diffstat (limited to 'org.eclipse.egit.ui.test/src')
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/synchronize/model/GitModelBlobTest.java12
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/synchronize/model/GitModelCacheFileTest.java4
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/synchronize/model/GitModelCacheTest.java4
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/synchronize/model/GitModelCommitTest.java12
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/synchronize/model/GitModelTreeTest.java8
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/synchronize/model/GitModelWorkingFileTest.java4
6 files changed, 22 insertions, 22 deletions
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/synchronize/model/GitModelBlobTest.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/synchronize/model/GitModelBlobTest.java
index 6fd41e813..9e959b72b 100644
--- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/synchronize/model/GitModelBlobTest.java
+++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/synchronize/model/GitModelBlobTest.java
@@ -111,8 +111,8 @@ public class GitModelBlobTest extends GitModelTestCase {
@Test
public void shouldBeSymmetric1() throws Exception {
// given
- GitModelBlob left = createGitModelBlob(zeroId(), getFile1Location());
- GitModelCommit right = new GitModelCommit(createModelRepository(),
+ GitModelObject left = createGitModelBlob(zeroId(), getFile1Location());
+ GitModelObject right = new GitModelCommit(createModelRepository(),
lookupRepository(leftRepoFile), getCommit(leftRepoFile, HEAD),
null);
@@ -188,8 +188,8 @@ public class GitModelBlobTest extends GitModelTestCase {
@Test public void shouldReturnNotEqualForBlobAndCommit() throws Exception {
// given
- GitModelBlob left = createGitModelBlob();
- GitModelCommit right = new GitModelCommit(createModelRepository(),
+ GitModelObject left = createGitModelBlob();
+ GitModelObject right = new GitModelCommit(createModelRepository(),
lookupRepository(leftRepoFile), getCommit(leftRepoFile, HEAD),
null);
@@ -202,8 +202,8 @@ public class GitModelBlobTest extends GitModelTestCase {
@Test public void shouldReturnNotEqualForBlobAndTree() throws Exception {
// given
- GitModelBlob left = createGitModelBlob();
- GitModelTree right = mock(GitModelTree.class);
+ GitModelObject left = createGitModelBlob();
+ GitModelObject right = mock(GitModelTree.class);
// when
boolean actual = left.equals(right);
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/synchronize/model/GitModelCacheFileTest.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/synchronize/model/GitModelCacheFileTest.java
index e9a3d74b5..19514a104 100644
--- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/synchronize/model/GitModelCacheFileTest.java
+++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/synchronize/model/GitModelCacheFileTest.java
@@ -133,10 +133,10 @@ public class GitModelCacheFileTest extends GitModelTestCase {
@Test public void shouldReturnNotEqualWhenComparingCacheFileAndWorkingFile()
throws Exception {
// given
- GitModelCacheFile left = createCacheFile(zeroId(),
+ GitModelObject left = createCacheFile(zeroId(),
fromString("000000006aa218a9c985e6ce9df2845eb575be48"),
getFile1Location());
- GitModelWorkingFile right = mock(GitModelWorkingFile.class);
+ GitModelObject right = mock(GitModelWorkingFile.class);
// when
boolean actual = left.equals(right);
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/synchronize/model/GitModelCacheTest.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/synchronize/model/GitModelCacheTest.java
index 7fae3168a..462a998c5 100644
--- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/synchronize/model/GitModelCacheTest.java
+++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/synchronize/model/GitModelCacheTest.java
@@ -89,9 +89,9 @@ public class GitModelCacheTest extends GitModelTestCase {
@Test public void shouldReturnNotEqualWhenCacheTreeAndCommit()
throws Exception {
// given
- GitModelCache left = new GitModelCache(createModelRepository(),
+ GitModelObject left = new GitModelCache(createModelRepository(),
lookupRepository(leftRepoFile), null);
- GitModelCommit right = mock(GitModelCommit.class);
+ GitModelObject right = mock(GitModelCommit.class);
// when
boolean actual = left.equals(right);
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/synchronize/model/GitModelCommitTest.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/synchronize/model/GitModelCommitTest.java
index 631ff8043..78412896a 100644
--- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/synchronize/model/GitModelCommitTest.java
+++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/synchronize/model/GitModelCommitTest.java
@@ -92,10 +92,10 @@ public class GitModelCommitTest extends GitModelTestCase {
@Test public void shouldReturnNotEqualWhenCommitTreeAndCache()
throws Exception {
// given
- GitModelCommit left = new GitModelCommit(createModelRepository(),
+ GitModelObject left = new GitModelCommit(createModelRepository(),
lookupRepository(leftRepoFile), getCommit(leftRepoFile, HEAD),
null);
- GitModelCache right = mock(GitModelCache.class);
+ GitModelObject right = mock(GitModelCache.class);
// when
boolean actual = left.equals(right);
@@ -107,10 +107,10 @@ public class GitModelCommitTest extends GitModelTestCase {
@Test public void shouldReturnNotEqualWhenCommitTreeAndTree()
throws Exception {
// given
- GitModelCommit left = new GitModelCommit(createModelRepository(),
+ GitModelObject left = new GitModelCommit(createModelRepository(),
lookupRepository(leftRepoFile), getCommit(leftRepoFile, HEAD),
null);
- GitModelTree right = mock(GitModelTree.class);
+ GitModelObject right = mock(GitModelTree.class);
// when
boolean actual = left.equals(right);
@@ -122,10 +122,10 @@ public class GitModelCommitTest extends GitModelTestCase {
@Test public void shouldReturnNotEqualWhenCommitTreeAndBlob()
throws Exception {
// given
- GitModelCommit left = new GitModelCommit(createModelRepository(),
+ GitModelObject left = new GitModelCommit(createModelRepository(),
lookupRepository(leftRepoFile), getCommit(leftRepoFile, HEAD),
null);
- GitModelBlob right = mock(GitModelBlob.class);
+ GitModelObject right = mock(GitModelBlob.class);
// when
boolean actual = left.equals(right);
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/synchronize/model/GitModelTreeTest.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/synchronize/model/GitModelTreeTest.java
index 44a8e7739..81fbad74f 100644
--- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/synchronize/model/GitModelTreeTest.java
+++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/synchronize/model/GitModelTreeTest.java
@@ -60,8 +60,8 @@ public class GitModelTreeTest extends GitModelTestCase {
@Test public void shouldReturnNotEqualForTreeAndCommit()
throws Exception {
// given
- GitModelTree left = createModelTree(getTreeLocation());
- GitModelCommit right = mock(GitModelCommit.class);
+ GitModelObject left = createModelTree(getTreeLocation());
+ GitModelObject right = mock(GitModelCommit.class);
// when
boolean actual = left.equals(right);
@@ -73,8 +73,8 @@ public class GitModelTreeTest extends GitModelTestCase {
@Test public void shouldReturnNotEqualForTreeAndBlob()
throws Exception {
// given
- GitModelTree left = createModelTree(getTreeLocation());
- GitModelBlob right = mock(GitModelBlob.class);
+ GitModelObject left = createModelTree(getTreeLocation());
+ GitModelObject right = mock(GitModelBlob.class);
// when
boolean actual = left.equals(right);
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/synchronize/model/GitModelWorkingFileTest.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/synchronize/model/GitModelWorkingFileTest.java
index 66413a3ab..c060f53c1 100644
--- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/synchronize/model/GitModelWorkingFileTest.java
+++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/synchronize/model/GitModelWorkingFileTest.java
@@ -71,8 +71,8 @@ public class GitModelWorkingFileTest extends GitModelTestCase {
@Test public void shouldReturnNotEqualWhenComparingWorkingFileAndCacheFile()
throws Exception {
// given
- GitModelWorkingFile left = createWorkingFile(getFile1Location());
- GitModelCacheFile right = mock(GitModelCacheFile.class);
+ GitModelObject left = createWorkingFile(getFile1Location());
+ GitModelObject right = mock(GitModelCacheFile.class);
// when
boolean actual = left.equals(right);

Back to the top