Have common class for entries in DynamicMap/DynamicSet/DynamicItem

At the moment we have several classes to represent plugin extensions:
DynamicMap.Entry, DynamicSet.Entry, NamedProvider

They are all very similar and can be merged into one class. This has the
advantage that we are now able to offer methods that deal with plugin
extensions regardless from which source they come.

Change-Id: I4293795800771ef06eae6ec6d64be4b0a8fd72f4
Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
Edwin Kempin
2018-09-14 09:11:13 +02:00
parent e1f6585b1d
commit abf6404f3b
23 changed files with 160 additions and 157 deletions

View File

@@ -19,8 +19,8 @@ import com.google.common.collect.ImmutableList;
import com.google.common.flogger.FluentLogger;
import com.google.gerrit.extensions.api.projects.ProjectConfigEntryType;
import com.google.gerrit.extensions.registration.DynamicMap;
import com.google.gerrit.extensions.registration.DynamicMap.Entry;
import com.google.gerrit.extensions.registration.DynamicSet;
import com.google.gerrit.extensions.registration.Extension;
import com.google.gerrit.extensions.restapi.AuthException;
import com.google.gerrit.reviewdb.client.Account;
import com.google.gerrit.reviewdb.client.Branch;
@@ -207,7 +207,7 @@ public class MergeValidators {
}
}
for (Entry<ProjectConfigEntry> e : pluginConfigEntries) {
for (Extension<ProjectConfigEntry> e : pluginConfigEntries) {
PluginConfig pluginCfg = cfg.getPluginConfig(e.getPluginName());
ProjectConfigEntry configEntry = e.getProvider().get();