diff options
author | Arne Juul <arnej@yahooinc.com> | 2023-02-10 20:41:18 +0000 |
---|---|---|
committer | Arne Juul <arnej@yahooinc.com> | 2023-02-11 15:44:07 +0000 |
commit | d55f1f06aaf9d10be266b9fbe5230843fd25ac2c (patch) | |
tree | 3cb8f2cb004e3d82d1b4b4519557921f482fff55 /config-model/src/main/java/com | |
parent | 5c279e5cbe42920c9bb898e69b791cec641daec7 (diff) |
use class objects
* for different usage we want both the class object and its name;
split into constants with names that are both different from the old name.
Diffstat (limited to 'config-model/src/main/java/com')
2 files changed, 6 insertions, 4 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/xml/BundleInstantiationSpecificationBuilder.java b/config-model/src/main/java/com/yahoo/vespa/model/container/xml/BundleInstantiationSpecificationBuilder.java index cdea63cfb70..10238a24476 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/container/xml/BundleInstantiationSpecificationBuilder.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/container/xml/BundleInstantiationSpecificationBuilder.java @@ -40,7 +40,7 @@ public class BundleInstantiationSpecificationBuilder { private static void validate(BundleInstantiationSpecification instSpec) { List<String> forbiddenClasses = Arrays.asList( - SearchHandler.HANDLER_CLASS, + SearchHandler.HANDLER_CLASSNAME, PROCESSING_HANDLER_CLASS); for (String forbiddenClass: forbiddenClasses) { diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/xml/SearchHandler.java b/config-model/src/main/java/com/yahoo/vespa/model/container/xml/SearchHandler.java index ee0c3e5796b..ebb22b2b73b 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/container/xml/SearchHandler.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/container/xml/SearchHandler.java @@ -22,10 +22,12 @@ import static com.yahoo.container.bundle.BundleInstantiationSpecification.fromSe */ class SearchHandler extends ProcessingHandler<SearchChains> { - static final String HANDLER_CLASS = com.yahoo.search.handler.SearchHandler.class.getName(); - static final String EXECUTION_FACTORY_CLASS = com.yahoo.search.searchchain.ExecutionFactory.class.getName(); + static final Class<?> SEARCH_HANDLER = com.yahoo.search.handler.SearchHandler.class; + static final Class<?> EXECUTION_FACTORY = com.yahoo.search.searchchain.ExecutionFactory.class; + static final String HANDLER_CLASSNAME = SEARCH_HANDLER.getName(); + static final String EXECUTION_FACTORY_CLASSNAME = EXECUTION_FACTORY.getName(); - static final BundleInstantiationSpecification HANDLER_SPEC = fromSearchAndDocproc(HANDLER_CLASS); + static final BundleInstantiationSpecification HANDLER_SPEC = fromSearchAndDocproc(HANDLER_CLASSNAME); static final BindingPattern DEFAULT_BINDING = bindingPattern(Optional.empty()); SearchHandler(ApplicationContainerCluster cluster, |