Added NPE gueard for TraceFeignContext

This commit is contained in:
Marcin Grzejszczak
2016-08-06 15:35:48 -07:00
parent 0781157f10
commit e408fd4190

View File

@@ -32,6 +32,9 @@ class TraceFeignContext extends FeignContext {
@Override
public <T> Map<String, T> getInstances(String name, Class<T> type) {
Map<String, T> instances = this.delegate.getInstances(name, type);
if (instances == null) {
return null;
}
Map<String, T> convertedInstances = new HashMap<>();
for (Map.Entry<String, T> entry : instances.entrySet()) {
convertedInstances.put(entry.getKey(), (T) this.traceFeignObjectWrapper.wrap(entry.getValue()));