Fix MetaTableRequest constructor

The pattern argument can be null which triggers a NPE when saved

Original commit: elastic/x-pack-elasticsearch@348d731b06
This commit is contained in:
Costin Leau 2017-12-01 20:48:21 +02:00
parent d8ef52dc0d
commit 5c6e5c1cb5
1 changed files with 1 additions and 4 deletions

View File

@ -16,10 +16,7 @@ public class MetaTableRequest extends Request {
private final String pattern;
public MetaTableRequest(String pattern) {
if (pattern == null) {
throw new IllegalArgumentException("[pattern] must not be null");
}
this.pattern = pattern;
this.pattern = pattern == null ? "" : pattern;
}
MetaTableRequest(SqlDataInput in) throws IOException {