Revert "bug 4844: Do not allow param values to be greater than length 256"

This reverts commit 7598ca07d3b3214e479886e3901df0f0db09f6f1.
This commit is contained in:
kishan 2011-10-25 14:22:14 +05:30
parent 8bc3e280cd
commit ca4b1917dd
1 changed files with 0 additions and 7 deletions

View File

@ -217,9 +217,6 @@ public class ApiDispatcher {
s_logger.debug("Invalid date parameter " + paramObj + " passed to command " + cmd.getCommandName().substring(0, cmd.getCommandName().length()-8));
}
throw new ServerApiException(BaseCmd.PARAM_ERROR, "Unable to parse date " + paramObj + " for command " + cmd.getCommandName().substring(0, cmd.getCommandName().length()-8) + ", please pass dates in the format mentioned in the api documentation");
} catch (InvalidParameterValueException invEx){
throw new ServerApiException(BaseCmd.PARAM_ERROR, "Unable to execute API command " + cmd.getCommandName().substring(0, cmd.getCommandName().length()-8) + " due to invalid value " + paramObj + " for parameter "
+ parameterAnnotation.name());
} catch (CloudRuntimeException cloudEx) {
// FIXME: Better error message? This only happens if the API command is not executable, which typically means
// there was
@ -303,10 +300,6 @@ public class ApiDispatcher {
field.set(cmdObj, Short.valueOf(paramObj.toString()));
break;
case STRING:
if((paramObj != null) && paramObj.toString().length() > 256){
s_logger.error("Value greater than max allowed length 256 for param: "+field.getName()+" Command: "+cmdObj.getCommandName().substring(0, cmdObj.getCommandName().length()-8));
throw new InvalidParameterValueException("Value greater than max allowed length 256 for param: "+field.getName()+" Command: "+cmdObj.getCommandName().substring(0, cmdObj.getCommandName().length()-8));
}
field.set(cmdObj, paramObj.toString());
break;
case TZDATE: