removed some eclipse warnings

This commit is contained in:
Inderjeet Singh 2014-03-09 07:33:08 +00:00
parent eaaa2a1b4f
commit f88eee094c
5 changed files with 5 additions and 8 deletions

View File

@ -68,6 +68,7 @@ public final class Streams {
TypeAdapters.JSON_ELEMENT.write(writer, element);
}
@SuppressWarnings("resource")
public static Writer writerForAppendable(Appendable appendable) {
return appendable instanceof Writer ? (Writer) appendable : new AppendableWriter(appendable);
}

View File

@ -49,7 +49,6 @@ public class VersionExclusionStrategyTest extends TestCase {
@Since(VERSION)
private static class MockObject {
@SuppressWarnings("unused")
@Since(VERSION)
public final int someField = 0;
}

View File

@ -110,7 +110,6 @@ public class ExposeFieldsTest extends TestCase {
assertNotNull(obj.interfaceField);
}
@SuppressWarnings("unused")
private static class ClassWithExposedFields {
@Expose private final Integer a;
private final Integer b;

View File

@ -67,7 +67,6 @@ public final class LinkedHashTreeMapTest extends TestCase {
} catch (ClassCastException expected) {}
}
@SuppressWarnings("SuspiciousMethodCalls")
public void testContainsNonComparableKeyReturnsFalse() {
LinkedHashTreeMap<String, String> map = new LinkedHashTreeMap<String, String>();
map.put("a", "android");

View File

@ -16,16 +16,16 @@
package com.google.gson.internal;
import com.google.gson.common.MoreAsserts;
import junit.framework.TestCase;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.Map;
import java.util.Random;
import junit.framework.TestCase;
import com.google.gson.common.MoreAsserts;
public final class LinkedTreeMapTest extends TestCase {
public void testIterationOrder() {
@ -67,7 +67,6 @@ public final class LinkedTreeMapTest extends TestCase {
} catch (ClassCastException expected) {}
}
@SuppressWarnings("SuspiciousMethodCalls")
public void testContainsNonComparableKeyReturnsFalse() {
LinkedTreeMap<String, String> map = new LinkedTreeMap<String, String>();
map.put("a", "android");