Reverting back commit e5c137e303babeba2afc80589f6677ae8a20ffd0 as it wasn't meant to be in 2.2 RC1.

This commit is contained in:
alena 2010-11-19 14:22:58 -08:00
parent 726cf09274
commit 8362d0feba

View File

@ -121,13 +121,6 @@ public class ApiDispatcher {
public static void setupParameters(BaseCmd cmd, Map<String, String> params){
Map<String, Object> unpackedParams = cmd.unpackParams(params);
if (cmd instanceof BaseListCmd) {
if ((unpackedParams.get(ApiConstants.PAGE) == null) && (unpackedParams.get(ApiConstants.PAGE_SIZE) != null)) {
throw new ServerApiException(BaseCmd.PARAM_ERROR, "\"page\" parameter is required when \"pagesize\" is specified");
} else if ((unpackedParams.get(ApiConstants.PAGE_SIZE) == null) && (unpackedParams.get(ApiConstants.PAGE) != null)) {
throw new ServerApiException(BaseCmd.PARAM_ERROR, "\"pagesize\" parameter is required when \"page\" is specified");
}
}
Field[] fields = cmd.getClass().getDeclaredFields();
Class<?> superClass = cmd.getClass().getSuperclass();