commit | e85dc740c9f09170501a173f1fffd383281eb4da | [log] [tgz] |
---|---|---|
author | margaretha <margaretha@ids-mannheim.de> | Wed Dec 04 14:22:34 2019 +0100 |
committer | margaretha <margaretha@ids-mannheim.de> | Wed Dec 04 14:22:34 2019 +0100 |
tree | b0a6ec9176a089e52b069944dc7b8037813eafa6 | |
parent | e9f68cccee95a085aeca574e20b6f09c20f76986 [diff] |
Fixed empty corpora list. Change-Id: I88b9f56672ec2790670fdf35bd5a5f9eef975aa4
diff --git a/src/main/java/de/ids_mannheim/korap/sru/KorapClient.java b/src/main/java/de/ids_mannheim/korap/sru/KorapClient.java index db71ddb..435e21e 100644 --- a/src/main/java/de/ids_mannheim/korap/sru/KorapClient.java +++ b/src/main/java/de/ids_mannheim/korap/sru/KorapClient.java
@@ -276,11 +276,10 @@ } String corpusQuery = ""; - int length = corpora.length; - if (corpora != null && length > 0){ - for (int i=0; i<length; i++){ - corpusQuery += "corpusSigle="+corpora[i]; - if (i != length-1){ + if (corpora != null && corpora.length > 0) { + for (int i = 0; i < corpora.length; i++) { + corpusQuery += "corpusSigle=" + corpora[i]; + if (i != corpora.length - 1) { corpusQuery += "|"; } }