mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Cleanup (typos; formatting)
GitOrigin-RevId: 78006976246264c7ac4693870651f190197833d2
This commit is contained in:
committed by
intellij-monorepo-bot
parent
c1231bca2c
commit
fc0b6309b8
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.ide;
|
||||
|
||||
import com.intellij.idea.Main;
|
||||
@@ -30,12 +30,13 @@ import java.util.regex.Pattern;
|
||||
/**
|
||||
* @author max
|
||||
*/
|
||||
public class BootstrapClassLoaderUtil extends ClassUtilCore {
|
||||
public class BootstrapClassLoaderUtil {
|
||||
public static final String CLASSPATH_ORDER_FILE = "classpath-order.txt";
|
||||
|
||||
private static final String PROPERTY_IGNORE_CLASSPATH = "ignore.classpath";
|
||||
private static final String PROPERTY_ALLOW_BOOTSTRAP_RESOURCES = "idea.allow.bootstrap.resources";
|
||||
private static final String PROPERTY_ADDITIONAL_CLASSPATH = "idea.additional.classpath";
|
||||
public static final String CLASSPATH_ORDER_FILE = "classpath-order.txt";
|
||||
private static final String MARKETPLACE_PLUGIN_NAME = "marketplace";
|
||||
private static final String MARKETPLACE_PLUGIN_DIR = "marketplace";
|
||||
|
||||
private BootstrapClassLoaderUtil() { }
|
||||
|
||||
@@ -53,10 +54,10 @@ public class BootstrapClassLoaderUtil extends ClassUtilCore {
|
||||
addAdditionalClassPath(classpath);
|
||||
addParentClasspath(classpath, true);
|
||||
|
||||
final File mpBoot = new File(PathManager.getPluginsPath(), MARKETPLACE_PLUGIN_NAME + "/lib/boot/marketplace-bootstrap.jar");
|
||||
final boolean installMarketplace = mpBoot.exists();
|
||||
File mpBoot = new File(PathManager.getPluginsPath(), MARKETPLACE_PLUGIN_DIR + "/lib/boot/marketplace-bootstrap.jar");
|
||||
boolean installMarketplace = mpBoot.exists();
|
||||
if (installMarketplace) {
|
||||
final File marketplaceImpl = new File(PathManager.getPluginsPath(), MARKETPLACE_PLUGIN_NAME + "/lib/boot/marketplace-impl.jar");
|
||||
File marketplaceImpl = new File(PathManager.getPluginsPath(), MARKETPLACE_PLUGIN_DIR + "/lib/boot/marketplace-impl.jar");
|
||||
if (marketplaceImpl.exists()) {
|
||||
classpath.add(marketplaceImpl.toURI().toURL());
|
||||
}
|
||||
@@ -77,8 +78,8 @@ public class BootstrapClassLoaderUtil extends ClassUtilCore {
|
||||
if (installMarketplace) {
|
||||
try {
|
||||
List<BytecodeTransformer> transformers = new SmartList<>();
|
||||
UrlClassLoader mpBootloader = UrlClassLoader.build().urls(mpBoot.toURI().toURL()).parent(BootstrapClassLoaderUtil.class.getClassLoader()).get();
|
||||
for (BytecodeTransformer transformer : ServiceLoader.load(BytecodeTransformer.class, mpBootloader)) {
|
||||
UrlClassLoader spiLoader = UrlClassLoader.build().urls(mpBoot.toURI().toURL()).parent(BootstrapClassLoaderUtil.class.getClassLoader()).get();
|
||||
for (BytecodeTransformer transformer : ServiceLoader.load(BytecodeTransformer.class, spiLoader)) {
|
||||
transformers.add(transformer);
|
||||
}
|
||||
if (!transformers.isEmpty()) {
|
||||
@@ -87,8 +88,8 @@ public class BootstrapClassLoaderUtil extends ClassUtilCore {
|
||||
}
|
||||
catch (Throwable e) {
|
||||
// at this point logging is not initialized yet, so reporting the error directly
|
||||
final String message = "As a workaround you may uninstall or update JetBrains Marketplace Support plugin at " +
|
||||
new File(PathManager.getPluginsPath(), MARKETPLACE_PLUGIN_NAME).getAbsolutePath();
|
||||
String path = new File(PathManager.getPluginsPath(), MARKETPLACE_PLUGIN_DIR).getAbsolutePath();
|
||||
String message = "As a workaround, you may uninstall or update JetBrains Marketplace Support plugin at " + path;
|
||||
Main.showMessage("JetBrains Marketplace boot failure", new Exception(message, e));
|
||||
}
|
||||
}
|
||||
@@ -277,7 +278,7 @@ public class BootstrapClassLoaderUtil extends ClassUtilCore {
|
||||
private byte[] doTransform(String name, ProtectionDomain protectionDomain, byte[] bytes) {
|
||||
byte[] b = bytes;
|
||||
for (BytecodeTransformer transformer : myTransformers) {
|
||||
final byte[] result = transformer.transform(this, name, protectionDomain, b);
|
||||
byte[] result = transformer.transform(this, name, protectionDomain, b);
|
||||
if (result != null) {
|
||||
b = result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user