summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test/tst
diff options
context:
space:
mode:
authorDavid Pursehouse <david.pursehouse@sonymobile.com>2016-01-14 17:01:50 +0900
committerMatthias Sohn <matthias.sohn@sap.com>2016-01-19 17:27:45 +0100
commit75e096c80ad3ad413c4ebb0b5369dc6417db00d9 (patch)
treee7a25e523e554a3799a351dd619282e2d19e88f3 /org.eclipse.jgit.test/tst
parent9ddc0ed83d56a54950fc91b459d473267144f194 (diff)
downloadjgit-75e096c80ad3ad413c4ebb0b5369dc6417db00d9.tar.gz
jgit-75e096c80ad3ad413c4ebb0b5369dc6417db00d9.zip
Suppress "The allocated object is never used" warning in tests
Change-Id: Ibb405e0b36ce5a2cb30268a7de31ab2bd079ad80 Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
Diffstat (limited to 'org.eclipse.jgit.test/tst')
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheEntryTest.java3
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/FileRepositoryBuilderTest.java3
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/T0003_BasicTest.java1
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/T0001_PersonIdentTest.java2
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/SideBandOutputStreamTest.java2
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/URIishTest.java2
6 files changed, 13 insertions, 0 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheEntryTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheEntryTest.java
index dc7181aece..05fa007904 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheEntryTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheEntryTest.java
@@ -69,6 +69,7 @@ public class DirCacheEntryTest {
assertFalse(isValidPath("a\u0000b"));
}
+ @SuppressWarnings("unused")
private static boolean isValidPath(String path) {
try {
new DirCacheEntry(path);
@@ -78,6 +79,7 @@ public class DirCacheEntryTest {
}
}
+ @SuppressWarnings("unused")
@Test
public void testCreate_ByStringPath() {
assertEquals("a", new DirCacheEntry("a").getPathString());
@@ -91,6 +93,7 @@ public class DirCacheEntryTest {
}
}
+ @SuppressWarnings("unused")
@Test
public void testCreate_ByStringPathAndStage() {
DirCacheEntry e;
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/FileRepositoryBuilderTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/FileRepositoryBuilderTest.java
index 280d6040cc..2d72d2373b 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/FileRepositoryBuilderTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/FileRepositoryBuilderTest.java
@@ -72,6 +72,7 @@ public class FileRepositoryBuilderTest extends LocalDiskRepositoryTestCase {
.findGitDir(d).getGitDir());
}
+ @SuppressWarnings("unused")
@Test
public void emptyRepositoryFormatVersion() throws Exception {
Repository r = createWorkRepository();
@@ -83,6 +84,7 @@ public class FileRepositoryBuilderTest extends LocalDiskRepositoryTestCase {
new FileRepository(r.getDirectory());
}
+ @SuppressWarnings("unused")
@Test
public void invalidRepositoryFormatVersion() throws Exception {
Repository r = createWorkRepository();
@@ -99,6 +101,7 @@ public class FileRepositoryBuilderTest extends LocalDiskRepositoryTestCase {
}
}
+ @SuppressWarnings("unused")
@Test
public void unknownRepositoryFormatVersion() throws Exception {
Repository r = createWorkRepository();
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/T0003_BasicTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/T0003_BasicTest.java
index 5670a9634d..a92ff8d04e 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/T0003_BasicTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/T0003_BasicTest.java
@@ -364,6 +364,7 @@ public class T0003_BasicTest extends SampleDataRepositoryTestCase {
assertNotSame(db.getConfig(), db2.getConfig());
}
+ @SuppressWarnings("unused")
@Test
public void test008_FailOnWrongVersion() throws IOException {
final File cfg = new File(db.getDirectory(), Constants.CONFIG);
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/T0001_PersonIdentTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/T0001_PersonIdentTest.java
index 315c495606..1515a07ac4 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/T0001_PersonIdentTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/T0001_PersonIdentTest.java
@@ -75,11 +75,13 @@ public class T0001_PersonIdentTest {
p.toExternalString());
}
+ @SuppressWarnings("unused")
@Test(expected = IllegalArgumentException.class)
public void nullForNameShouldThrowIllegalArgumentException() {
new PersonIdent(null, "author@example.com");
}
+ @SuppressWarnings("unused")
@Test(expected = IllegalArgumentException.class)
public void nullForEmailShouldThrowIllegalArgumentException() {
new PersonIdent("A U Thor", null);
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/SideBandOutputStreamTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/SideBandOutputStreamTest.java
index e9ae1909ea..3661677cd9 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/SideBandOutputStreamTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/SideBandOutputStreamTest.java
@@ -195,6 +195,7 @@ public class SideBandOutputStreamTest {
assertEquals(1, flushCnt[0]);
}
+ @SuppressWarnings("unused")
@Test
public void testConstructor_RejectsBadChannel() {
try {
@@ -220,6 +221,7 @@ public class SideBandOutputStreamTest {
}
}
+ @SuppressWarnings("unused")
@Test
public void testConstructor_RejectsBadBufferSize() {
try {
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/URIishTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/URIishTest.java
index 76eb18afdf..0fda72cf9d 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/URIishTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/URIishTest.java
@@ -64,6 +64,7 @@ public class URIishTest {
private static final String GIT_SCHEME = "git://";
+ @SuppressWarnings("unused")
@Test
public void shouldRaiseErrorOnEmptyURI() throws Exception {
try {
@@ -74,6 +75,7 @@ public class URIishTest {
}
}
+ @SuppressWarnings("unused")
@Test
public void shouldRaiseErrorOnNullURI() throws Exception {
try {