Removed eclipse warnings about unneeded else statements and rawtypes/unchecked access.
This commit is contained in:
parent
4d873d5dd7
commit
eac1505670
@ -62,7 +62,7 @@ final class DefaultTypeAdapters {
|
||||
private static final DefaultTimestampDeserializer TIMESTAMP_DESERIALIZER =
|
||||
new DefaultTimestampDeserializer();
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@SuppressWarnings("rawtypes")
|
||||
private static final EnumTypeAdapter ENUM_TYPE_ADAPTER = new EnumTypeAdapter();
|
||||
private static final UrlTypeAdapter URL_TYPE_ADAPTER = new UrlTypeAdapter();
|
||||
private static final UriTypeAdapter URI_TYPE_ADAPTER = new UriTypeAdapter();
|
||||
@ -196,7 +196,7 @@ final class DefaultTypeAdapters {
|
||||
return map;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
private static JsonDeserializer<?> wrapDeserializer(JsonDeserializer<?> deserializer) {
|
||||
return new JsonDeserializerExceptionWrapper(deserializer);
|
||||
}
|
||||
@ -507,7 +507,7 @@ final class DefaultTypeAdapters {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
private static class CollectionTypeAdapter implements JsonSerializer<Collection>,
|
||||
JsonDeserializer<Collection>, InstanceCreator<Collection> {
|
||||
public JsonElement serialize(Collection src, Type typeOfSrc, JsonSerializationContext context) {
|
||||
@ -570,7 +570,7 @@ final class DefaultTypeAdapters {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
static class MapTypeAdapter implements JsonSerializer<Map>, JsonDeserializer<Map>,
|
||||
InstanceCreator<Map> {
|
||||
|
||||
|
@ -171,7 +171,7 @@ final class JsonSerializationVisitor implements ObjectNavigator.Visitor {
|
||||
/**
|
||||
* objTypePair.getObject() must not be null
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
private JsonElement findAndInvokeCustomSerializer(ObjectTypePair objTypePair) {
|
||||
Pair<JsonSerializer<?>,ObjectTypePair> pair = objTypePair.getMatchingHandler(serializers);
|
||||
if (pair == null) {
|
||||
|
@ -45,9 +45,8 @@ final class Streams {
|
||||
*/
|
||||
if (isEmpty) {
|
||||
return JsonNull.createJsonNull();
|
||||
} else {
|
||||
throw new JsonIOException(e);
|
||||
}
|
||||
throw new JsonIOException(e);
|
||||
} catch (MalformedJsonException e) {
|
||||
throw new JsonSyntaxException(e);
|
||||
} catch (IOException e) {
|
||||
|
@ -70,11 +70,9 @@ public class TypeVariableTest extends TestCase {
|
||||
public boolean equals(Object o) {
|
||||
if (!(o instanceof Blue)) {
|
||||
return false;
|
||||
} else {
|
||||
Blue blue = (Blue) o;
|
||||
return redField.equals(blue.redField);
|
||||
|
||||
}
|
||||
Blue blue = (Blue) o;
|
||||
return redField.equals(blue.redField);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user