From 1940faf16312e5400cf7db09e5dd18a1293c19a6 Mon Sep 17 00:00:00 2001 From: Marco Miller Date: Mon, 30 Sep 2019 14:11:56 -0400 Subject: [PATCH] IndexConfig: Remove checkTypeLimit to restore supporting any type As configurations such as Google's require another index type than the currently known ones. Change-Id: Ie0393e1b5ea19369ab780bbbf75500195951946b --- java/com/google/gerrit/index/IndexConfig.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/java/com/google/gerrit/index/IndexConfig.java b/java/com/google/gerrit/index/IndexConfig.java index d8a1a89563..807c78c314 100644 --- a/java/com/google/gerrit/index/IndexConfig.java +++ b/java/com/google/gerrit/index/IndexConfig.java @@ -91,7 +91,6 @@ public abstract class IndexConfig { checkLimit(cfg.maxLimit(), "maxLimit"); checkLimit(cfg.maxPages(), "maxPages"); checkLimit(cfg.maxTerms(), "maxTerms"); - checkTypeLimit(cfg); return cfg; } } @@ -100,12 +99,6 @@ public abstract class IndexConfig { checkArgument(limit > 0, "%s must be positive: %s", name, limit); } - private static void checkTypeLimit(IndexConfig cfg) { - String limit = cfg.type(); - boolean known = IndexType.getKnownTypes().asList().contains(limit); - checkArgument(known, "type must be known: %s", limit); - } - /** * @return maximum limit supported by the underlying index, or limited for performance reasons. */ @@ -123,7 +116,7 @@ public abstract class IndexConfig { */ public abstract int maxTerms(); - /** @return index type, limited to be either one of the known types. */ + /** @return index type. */ public abstract String type(); /**