updated oss-parent version to 7 in gson-extras pom.
fixed some eclipse warnings.
This commit is contained in:
parent
982c893d65
commit
42e35e9f90
@ -9,7 +9,7 @@
|
||||
<parent>
|
||||
<groupId>org.sonatype.oss</groupId>
|
||||
<artifactId>oss-parent</artifactId>
|
||||
<version>5</version>
|
||||
<version>7</version>
|
||||
</parent>
|
||||
<url>http://code.google.com/p/google-gson/</url>
|
||||
<description>Google Gson grab bag of utilities, type adapters, etc.</description>
|
||||
|
@ -36,7 +36,7 @@ public class RawCollectionsExample {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
public static void main(String[] args) {
|
||||
Gson gson = new Gson();
|
||||
Collection collection = new ArrayList();
|
||||
|
@ -40,6 +40,7 @@ import java.util.Queue;
|
||||
* Writes a graph of objects as a list of named nodes.
|
||||
*/
|
||||
// TODO: proper documentation
|
||||
@SuppressWarnings("rawtypes")
|
||||
public final class GraphAdapterBuilder {
|
||||
private final ConstructorConstructor constructorConstructor = new ConstructorConstructor();
|
||||
private final Map<Type, InstanceCreator<?>> instanceCreators
|
||||
@ -207,6 +208,7 @@ public final class GraphAdapterBuilder {
|
||||
* <p>Gson should only ever call this method when we're expecting it to;
|
||||
* that is only when we've called back into Gson to deserialize a tree.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public Object createInstance(Type type) {
|
||||
Graph graph = graphThreadLocal.get();
|
||||
if (graph == null || graph.nextCreate == null) {
|
||||
|
@ -216,6 +216,7 @@ public class CustomTypeAdaptersTest extends TestCase {
|
||||
assertEquals("true", gson.toJson(true, Boolean.class));
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
public void testCustomDeserializerInvokedForPrimitives() {
|
||||
Gson gson = new GsonBuilder()
|
||||
.registerTypeAdapter(boolean.class, new JsonDeserializer() {
|
||||
|
Loading…
Reference in New Issue
Block a user