Fixed getMandatory

This commit is contained in:
Fabio Sinibaldi 2022-08-03 11:41:29 +02:00
parent ebeba09151
commit 8b92208774
1 changed files with 1 additions and 5 deletions

View File

@ -41,11 +41,7 @@ public class BaseRequest {
public static final String getMandatory(String param,Document params) throws InvalidPluginRequestException {
if(params==null || params.isEmpty()|| !params.containsKey(param)) throw new InvalidPluginRequestException("Missing mandatory parameter "+param);
try {
return Serialization.write(params.get(param));
} catch (JsonProcessingException e) {
throw new InvalidPluginRequestException(e);
}
return Serialization.convert(params.get(param),String.class);
}
public BaseRequest validate() throws InvalidPluginRequestException {