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