Committed by
Gerrit Code Review
Use the correct key when unregistering a config factory
Change-Id: I2600f5dd32712e730c06336d1afa50cff1d62eca
Showing
1 changed file
with
2 additions
and
2 deletions
... | @@ -62,7 +62,7 @@ public class NetworkConfigManager | ... | @@ -62,7 +62,7 @@ public class NetworkConfigManager |
62 | // Inventory of configuration factories | 62 | // Inventory of configuration factories |
63 | private final Map<ConfigKey, ConfigFactory> factories = Maps.newConcurrentMap(); | 63 | private final Map<ConfigKey, ConfigFactory> factories = Maps.newConcurrentMap(); |
64 | 64 | ||
65 | - // Secondary indeces to retrieve subject and config classes by keys | 65 | + // Secondary indices to retrieve subject and config classes by keys |
66 | private final Map<String, SubjectFactory> subjectClasses = Maps.newConcurrentMap(); | 66 | private final Map<String, SubjectFactory> subjectClasses = Maps.newConcurrentMap(); |
67 | private final Map<Class, SubjectFactory> subjectClassKeys = Maps.newConcurrentMap(); | 67 | private final Map<Class, SubjectFactory> subjectClassKeys = Maps.newConcurrentMap(); |
68 | private final Map<ConfigIdentifier, Class<? extends Config>> configClasses = Maps.newConcurrentMap(); | 68 | private final Map<ConfigIdentifier, Class<? extends Config>> configClasses = Maps.newConcurrentMap(); |
... | @@ -106,7 +106,7 @@ public class NetworkConfigManager | ... | @@ -106,7 +106,7 @@ public class NetworkConfigManager |
106 | public void unregisterConfigFactory(ConfigFactory configFactory) { | 106 | public void unregisterConfigFactory(ConfigFactory configFactory) { |
107 | checkNotNull(configFactory, NULL_FACTORY_MSG); | 107 | checkNotNull(configFactory, NULL_FACTORY_MSG); |
108 | factories.remove(key(configFactory)); | 108 | factories.remove(key(configFactory)); |
109 | - configClasses.remove(configFactory.configKey()); | 109 | + configClasses.remove(identifier(configFactory)); |
110 | 110 | ||
111 | // Note that we are deliberately not removing subject factory key bindings. | 111 | // Note that we are deliberately not removing subject factory key bindings. |
112 | store.removeConfigFactory(configFactory); | 112 | store.removeConfigFactory(configFactory); | ... | ... |
-
Please register or login to post a comment