removed eclipse warnings. updated maven plugins to the latest versions
This commit is contained in:
parent
84e3442eb0
commit
1de2ace065
10
gson/pom.xml
10
gson/pom.xml
|
@ -109,7 +109,7 @@
|
|||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.1</version>
|
||||
<version>3.2</version>
|
||||
<configuration>
|
||||
<source>1.5</source>
|
||||
<target>1.5</target>
|
||||
|
@ -118,7 +118,7 @@
|
|||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>2.4</version>
|
||||
<version>2.5</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
|
@ -149,7 +149,7 @@
|
|||
<!-- TODO(inder): add manifest entry for maven group, artifact, and classifier ids -->
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-source-plugin</artifactId>
|
||||
<version>2.3</version>
|
||||
<version>2.4</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-sources</id>
|
||||
|
@ -174,7 +174,7 @@
|
|||
<!-- TODO(inder): add manifest entry for maven group, artifact, and classifier ids -->
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>2.9.1</version>
|
||||
<version>2.10.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-javadocs</id>
|
||||
|
@ -219,7 +219,7 @@
|
|||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<version>2.4.1</version>
|
||||
<version>2.5.1</version>
|
||||
<configuration>
|
||||
<descriptor>assembly-descriptor.xml</descriptor>
|
||||
<finalName>google-gson-${project.version}</finalName>
|
||||
|
|
|
@ -37,7 +37,7 @@ public final class JsonAdapterAnnotationTypeAdapterFactory implements TypeAdapte
|
|||
this.constructorConstructor = constructorConstructor;
|
||||
}
|
||||
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> targetType) {
|
||||
JsonAdapter annotation = targetType.getRawType().getAnnotation(JsonAdapter.class);
|
||||
if (annotation == null) {
|
||||
|
|
|
@ -162,6 +162,7 @@ public final class JsonAdapterAnnotationOnClassesTest extends TestCase {
|
|||
@Override public void write(JsonWriter out, T value) throws IOException {
|
||||
out.value("jsonAdapterFactory");
|
||||
}
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override public T read(JsonReader in) throws IOException {
|
||||
in.nextString();
|
||||
return (T) new C("jsonAdapterFactory");
|
||||
|
|
|
@ -20,6 +20,7 @@ import java.io.IOException;
|
|||
import java.io.StringReader;
|
||||
import junit.framework.TestCase;
|
||||
|
||||
@SuppressWarnings("resource")
|
||||
public class JsonReaderPathTest extends TestCase {
|
||||
public void testPath() throws IOException {
|
||||
JsonReader reader = new JsonReader(
|
||||
|
|
|
@ -1755,9 +1755,8 @@ public final class JsonReaderTest extends TestCase {
|
|||
* Returns a reader that returns one character at a time.
|
||||
*/
|
||||
private Reader reader(final String s) {
|
||||
if (true) return new StringReader(s);
|
||||
|
||||
return new Reader() {
|
||||
/* if (true) */ return new StringReader(s);
|
||||
/* return new Reader() {
|
||||
int position = 0;
|
||||
@Override public int read(char[] buffer, int offset, int count) throws IOException {
|
||||
if (position == s.length()) {
|
||||
|
@ -1771,6 +1770,6 @@ public final class JsonReaderTest extends TestCase {
|
|||
}
|
||||
@Override public void close() throws IOException {
|
||||
}
|
||||
};
|
||||
}; */
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue