|
19 | 19 |
|
20 | 20 | package org.elasticsearch.bootstrap;
|
21 | 21 |
|
22 |
| -import org.apache.logging.log4j.LogManager; |
23 | 22 | import org.apache.logging.log4j.Logger;
|
| 23 | +import org.apache.logging.log4j.LogManager; |
24 | 24 | import org.apache.logging.log4j.core.Appender;
|
25 | 25 | import org.apache.logging.log4j.core.LoggerContext;
|
26 | 26 | import org.apache.logging.log4j.core.appender.ConsoleAppender;
|
27 | 27 | import org.apache.logging.log4j.core.config.Configurator;
|
28 | 28 | import org.apache.lucene.util.Constants;
|
| 29 | +import org.elasticsearch.core.internal.io.IOUtils; |
29 | 30 | import org.apache.lucene.util.StringHelper;
|
30 | 31 | import org.elasticsearch.ElasticsearchException;
|
31 | 32 | import org.elasticsearch.Version;
|
|
41 | 42 | import org.elasticsearch.common.settings.SecureSettings;
|
42 | 43 | import org.elasticsearch.common.settings.Settings;
|
43 | 44 | import org.elasticsearch.common.transport.BoundTransportAddress;
|
44 |
| -import org.elasticsearch.core.internal.io.IOUtils; |
45 | 45 | import org.elasticsearch.env.Environment;
|
46 | 46 | import org.elasticsearch.monitor.jvm.JvmInfo;
|
47 | 47 | import org.elasticsearch.monitor.os.OsProbe;
|
@@ -160,24 +160,6 @@ static void initializeProbes() {
|
160 | 160 | JvmInfo.jvmInfo();
|
161 | 161 | }
|
162 | 162 |
|
163 |
| - /** |
164 |
| - * JDK 14 bug: |
165 |
| - * https://github.com/elastic/elasticsearch/issues/50512 |
166 |
| - * We circumvent it here by loading the offending class before installing security manager. |
167 |
| - * |
168 |
| - * To be removed once the JDK is fixed. |
169 |
| - */ |
170 |
| - static void fixJDK14EAFileChannelMap() { |
171 |
| - // minor time-bomb here to ensure that we reevaluate if final 14 version does not include fix. |
172 |
| - if (System.getProperty("java.version").equals("14-ea")) { |
173 |
| - try { |
174 |
| - Class.forName("jdk.internal.misc.ExtendedMapMode", true, Bootstrap.class.getClassLoader()); |
175 |
| - } catch (ClassNotFoundException e) { |
176 |
| - throw new RuntimeException("Unable to lookup ExtendedMapMode class", e); |
177 |
| - } |
178 |
| - } |
179 |
| - } |
180 |
| - |
181 | 163 | private void setup(boolean addShutdownHook, Environment environment) throws BootstrapException {
|
182 | 164 | Settings settings = environment.settings();
|
183 | 165 |
|
@@ -229,8 +211,6 @@ public void run() {
|
229 | 211 | // Log ifconfig output before SecurityManager is installed
|
230 | 212 | IfConfig.logIfNecessary();
|
231 | 213 |
|
232 |
| - fixJDK14EAFileChannelMap(); |
233 |
| - |
234 | 214 | // install SM after natives, shutdown hooks, etc.
|
235 | 215 | try {
|
236 | 216 | Security.configure(environment, BootstrapSettings.SECURITY_FILTER_BAD_DEFAULTS_SETTING.get(settings));
|
|
0 commit comments