Committed by
Gerrit Code Review
Fixed NPE in distributed network config store that can result from requesting co…
…nfig classes when there is a pending configuration. Change-Id: I82eb332c3d7a214491362553617b12435bf42fb8
Showing
1 changed file
with
3 additions
and
2 deletions
... | @@ -226,10 +226,11 @@ public class DistributedNetworkConfigStore | ... | @@ -226,10 +226,11 @@ public class DistributedNetworkConfigStore |
226 | if (Objects.equals(subject, k.subject) && k.configClass != null && delegate != null) { | 226 | if (Objects.equals(subject, k.subject) && k.configClass != null && delegate != null) { |
227 | ConfigFactory<S, ? extends Config<S>> configFactory = factoriesByConfig.get(k.configClass); | 227 | ConfigFactory<S, ? extends Config<S>> configFactory = factoriesByConfig.get(k.configClass); |
228 | if (configFactory == null) { | 228 | if (configFactory == null) { |
229 | - log.error("Found config but no config factory: subject={}, configClass={}", | 229 | + log.warn("Found config but no config factory: subject={}, configClass={}", |
230 | subject, k.configClass); | 230 | subject, k.configClass); |
231 | + } else { | ||
232 | + builder.add(configFactory.configClass()); | ||
231 | } | 233 | } |
232 | - builder.add(factoriesByConfig.get(k.configClass).configClass()); | ||
233 | } | 234 | } |
234 | }); | 235 | }); |
235 | return builder.build(); | 236 | return builder.build(); | ... | ... |
-
Please register or login to post a comment