removed unused no-args constructors
This commit is contained in:
parent
6d3e0e92a5
commit
005c93e383
@ -53,10 +53,6 @@ public class TestTypes {
|
||||
public static class ClassWithBaseField {
|
||||
public static final String FIELD_KEY = "base";
|
||||
public final Base base;
|
||||
@SuppressWarnings("unused")
|
||||
private ClassWithBaseField() {
|
||||
this(null);
|
||||
}
|
||||
public ClassWithBaseField(Base base) {
|
||||
this.base = base;
|
||||
}
|
||||
@ -65,10 +61,6 @@ public class TestTypes {
|
||||
public static class ClassWithBaseArrayField {
|
||||
public static final String FIELD_KEY = "base";
|
||||
public final Base[] base;
|
||||
@SuppressWarnings("unused")
|
||||
private ClassWithBaseArrayField() {
|
||||
this(null);
|
||||
}
|
||||
public ClassWithBaseArrayField(Base[] base) {
|
||||
this.base = base;
|
||||
}
|
||||
@ -94,10 +86,6 @@ public class TestTypes {
|
||||
public static class StringWrapper {
|
||||
public final String someConstantStringInstanceField;
|
||||
|
||||
StringWrapper() {
|
||||
this("Blah");
|
||||
}
|
||||
|
||||
public StringWrapper(String value) {
|
||||
someConstantStringInstanceField = value;
|
||||
}
|
||||
@ -182,10 +170,6 @@ public class TestTypes {
|
||||
private final Integer intValue;
|
||||
private final Boolean booleanValue;
|
||||
|
||||
public BagOfPrimitiveWrappers() {
|
||||
this(0L, 0, false);
|
||||
}
|
||||
|
||||
public BagOfPrimitiveWrappers(Long longValue, Integer intValue, Boolean booleanValue) {
|
||||
this.longValue = longValue;
|
||||
this.intValue = intValue;
|
||||
|
@ -306,12 +306,6 @@ public class CollectionTest extends TestCase {
|
||||
private static class ObjectWithWildcardCollection {
|
||||
private final Collection<? extends BagOfPrimitives> collection;
|
||||
|
||||
// For use by Gson
|
||||
@SuppressWarnings({ "unchecked", "unused" })
|
||||
public ObjectWithWildcardCollection() {
|
||||
this(Collections.EMPTY_LIST);
|
||||
}
|
||||
|
||||
public ObjectWithWildcardCollection(Collection<? extends BagOfPrimitives> collection) {
|
||||
this.collection = collection;
|
||||
}
|
||||
@ -323,11 +317,6 @@ public class CollectionTest extends TestCase {
|
||||
|
||||
private static class Entry {
|
||||
int value;
|
||||
// For use by Gson
|
||||
@SuppressWarnings("unused")
|
||||
private Entry() {
|
||||
this(10);
|
||||
}
|
||||
Entry(int value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
@ -427,12 +427,6 @@ public class CustomTypeAdaptersTest extends TestCase {
|
||||
private static class DataHolder {
|
||||
final String data;
|
||||
|
||||
// For use by Gson
|
||||
@SuppressWarnings("unused")
|
||||
private DataHolder() {
|
||||
this("");
|
||||
}
|
||||
|
||||
public DataHolder(String data) {
|
||||
this.data = data;
|
||||
}
|
||||
@ -441,12 +435,6 @@ public class CustomTypeAdaptersTest extends TestCase {
|
||||
private static class DataHolderWrapper {
|
||||
final DataHolder wrappedData;
|
||||
|
||||
// For use by Gson
|
||||
@SuppressWarnings("unused")
|
||||
private DataHolderWrapper() {
|
||||
this(null);
|
||||
}
|
||||
|
||||
public DataHolderWrapper(DataHolder data) {
|
||||
this.wrappedData = data;
|
||||
}
|
||||
|
@ -397,9 +397,6 @@ public class DefaultTypeAdaptersTest extends TestCase {
|
||||
|
||||
private static class ClassWithBigDecimal {
|
||||
BigDecimal value;
|
||||
// For use by Gson
|
||||
@SuppressWarnings("unused")
|
||||
private ClassWithBigDecimal() { }
|
||||
ClassWithBigDecimal(String value) {
|
||||
this.value = new BigDecimal(value);
|
||||
}
|
||||
@ -410,9 +407,6 @@ public class DefaultTypeAdaptersTest extends TestCase {
|
||||
|
||||
private static class ClassWithBigInteger {
|
||||
BigInteger value;
|
||||
// For use by Gson
|
||||
@SuppressWarnings("unused")
|
||||
private ClassWithBigInteger() { }
|
||||
ClassWithBigInteger(String value) {
|
||||
this.value = new BigInteger(value);
|
||||
}
|
||||
|
@ -118,11 +118,6 @@ public class ExposeFieldsTest extends TestCase {
|
||||
@Expose(deserialize = false) final double d;
|
||||
@Expose(serialize = false, deserialize = false) final char e;
|
||||
|
||||
// For use by Gson
|
||||
private ClassWithExposedFields() {
|
||||
this(null, null);
|
||||
}
|
||||
|
||||
public ClassWithExposedFields(Integer a, Integer b) {
|
||||
this(a, b, 1L, 2.0, 'a');
|
||||
}
|
||||
@ -168,12 +163,6 @@ public class ExposeFieldsTest extends TestCase {
|
||||
@Expose
|
||||
private final SomeInterface interfaceField;
|
||||
|
||||
// For use by Gson
|
||||
@SuppressWarnings("unused")
|
||||
private ClassWithInterfaceField() {
|
||||
this(null);
|
||||
}
|
||||
|
||||
public ClassWithInterfaceField(SomeInterface interfaceField) {
|
||||
this.interfaceField = interfaceField;
|
||||
}
|
||||
|
@ -125,12 +125,6 @@ public class InheritanceTest extends TestCase {
|
||||
private static class SubTypeOfNested extends Nested {
|
||||
private final long value = 5;
|
||||
|
||||
// Used by Gson
|
||||
@SuppressWarnings("unused")
|
||||
private SubTypeOfNested() {
|
||||
this(null, null);
|
||||
}
|
||||
|
||||
public SubTypeOfNested(BagOfPrimitives primitive1, BagOfPrimitives primitive2) {
|
||||
super(primitive1, primitive2);
|
||||
}
|
||||
@ -186,11 +180,6 @@ public class InheritanceTest extends TestCase {
|
||||
private Set<Float> set;
|
||||
private SortedSet<Character> sortedSet;
|
||||
|
||||
// For use by Gson
|
||||
@SuppressWarnings("unused")
|
||||
private ClassWithSubInterfacesOfCollection() {
|
||||
}
|
||||
|
||||
public ClassWithSubInterfacesOfCollection(List<Integer> list, Queue<Long> queue, Set<Float> set,
|
||||
SortedSet<Character> sortedSet) {
|
||||
this.list = list;
|
||||
|
Loading…
Reference in New Issue
Block a user