Modularize runtime-fields-common (#93719)
This change modulares the runtime-fields-common component by adding a module-info.java. relates #78744
This commit is contained in:
parent
b18c036761
commit
e5a61067e7
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
||||
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
||||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
module org.elasticsearch.runtimefields {
|
||||
requires org.elasticsearch.base;
|
||||
requires org.elasticsearch.server;
|
||||
|
||||
requires org.elasticsearch.dissect;
|
||||
requires org.elasticsearch.grok;
|
||||
requires org.elasticsearch.painless.spi;
|
||||
requires org.elasticsearch.xcontent;
|
||||
|
||||
requires org.apache.lucene.core;
|
||||
|
||||
exports org.elasticsearch.runtimefields;
|
||||
|
||||
opens org.elasticsearch.runtimefields to org.elasticsearch.painless.spi; // whitelist resource access
|
||||
|
||||
provides org.elasticsearch.painless.spi.PainlessExtension with org.elasticsearch.runtimefields.RuntimeFieldsPainlessExtension;
|
||||
}
|
|
@ -28,6 +28,11 @@ import java.util.Map;
|
|||
public class RuntimeFieldsPainlessExtension implements PainlessExtension {
|
||||
private final List<Whitelist> whitelists;
|
||||
|
||||
// we don't use ServiceProvider directly, but module-info wants this
|
||||
public RuntimeFieldsPainlessExtension() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public RuntimeFieldsPainlessExtension(RuntimeFieldsCommonPlugin plugin) {
|
||||
Whitelist commonWhitelist = WhitelistLoader.loadFromResourceFiles(RuntimeFieldsPainlessExtension.class, "common_whitelist.txt");
|
||||
Whitelist grokWhitelist = new Whitelist(
|
||||
|
|
Loading…
Reference in New Issue