Check on get Mandatory
This commit is contained in:
parent
c489f267e6
commit
a0ffa08813
|
@ -38,7 +38,7 @@ public class BaseRequest {
|
|||
}
|
||||
|
||||
public static final String getMandatory(String param,Document params) throws InvalidPluginRequestException {
|
||||
if(!params.containsKey(param)) throw new InvalidPluginRequestException("Missing mandatory parameter "+param);
|
||||
if(params==null || params.isEmpty()|| !params.containsKey(param)) throw new InvalidPluginRequestException("Missing mandatory parameter "+param);
|
||||
return params.getString(param);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue