Fixing compiler warnings

This commit is contained in:
Inderjeet Singh 2010-11-02 00:13:48 +00:00
parent cf02621275
commit 4413c299ea
7 changed files with 14 additions and 6 deletions

View File

@ -19,7 +19,7 @@ import java.util.concurrent.Executor;
/**
* An {@link Executor} with an additional method for shutdown. We could have just used
* {@link java.util.concurent.ExecutorService}, however, that requires too many methods to be
* {@link java.util.concurrent.ExecutorService}, however, that requires too many methods to be
* implemented.
*
* @author inder

View File

@ -36,22 +36,27 @@ public class ContentBodySpec implements ParamMapSpec {
this.paramsSpec = Collections.unmodifiableMap(paramsSpec);
}
@Override
public Type getTypeFor(String paramName) {
return paramsSpec.get(paramName);
}
@Override
public boolean checkIfCompatible(String paramName, Type type) {
return type.equals(getTypeFor(paramName));
}
@Override
public boolean checkIfCompatible(String paramName, Object object) {
return checkIfCompatible(paramName, object.getClass());
}
@Override
public Set<Map.Entry<String, Type>> entrySet() {
return paramsSpec.entrySet();
}
@Override
public int size() {
return paramsSpec.size();
}

View File

@ -44,10 +44,12 @@ public final class HeaderMapSpec implements ParamMapSpec {
this.map = map;
}
@Override
public Type getTypeFor(String headerName) {
return map.get(headerName);
}
@Override
public Set<Map.Entry<String, Type>> entrySet() {
return map.entrySet();
}
@ -63,6 +65,7 @@ public final class HeaderMapSpec implements ParamMapSpec {
return rawClassOfHeader.isAssignableFrom(rawClassOfTargetType);
}
@Override
public boolean checkIfCompatible(String headerName, Object headerValue) {
return checkIfCompatible(headerName, headerValue.getClass());
}

View File

@ -20,7 +20,7 @@ package com.google.gson.webservice.definition.rest;
*
* @author inder
*
* @param <T> type of object
* @param <R> type of object
*/
public interface HasId<R> {
public Id<R> getId();

View File

@ -62,7 +62,7 @@ public final class MetaData<R extends RestResource<R>> {
}
public String getString(String key) {
return (String) map.get(key);
return map.get(key);
}
public void putString(String key, String value) {
@ -83,7 +83,7 @@ public final class MetaData<R extends RestResource<R>> {
}
public Object getFromTransient(Object key) {
return (String) mapTransient.get(key);
return mapTransient.get(key);
}
public void putInTransient(Object key, Object value) {

View File

@ -49,6 +49,6 @@ public final class ResourceMap {
}
public RestCallSpec get(CallPath callPath) {
return (RestCallSpec)resources.get(callPath);
return resources.get(callPath);
}
}

View File

@ -38,7 +38,7 @@ public class IdMap<T extends HasId<T>> {
private final Type typeOfId;
/**
* Use {@link #create(Class)} instead of constructor
* Use {@link #create(Type)} instead of constructor
*/
protected IdMap(Type typeOfId) {
this.typeOfId = typeOfId;