config service: return an empty config if no config is found

Returning an empty body breaks the client as it deserializes the
response to null.
This commit is contained in:
Adam
2019-03-21 21:27:07 -04:00
parent 6f2359a7d8
commit b50b3fc07b

View File

@@ -36,6 +36,7 @@ import static com.mongodb.client.model.Updates.set;
import static com.mongodb.client.model.Updates.unset;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import javax.annotation.Nullable;
@@ -114,7 +115,7 @@ public class ConfigService
if (configMap == null || configMap.isEmpty())
{
return null;
return new Configuration(Collections.emptyList());
}
List<ConfigEntry> config = new ArrayList<>();