From 01f2bf419b7ff1a94c8c6cebd2f2284f8e97d2dc Mon Sep 17 00:00:00 2001 From: Sergey Ignatov Date: Tue, 23 Jul 2019 16:11:10 -0600 Subject: [PATCH] there's no need to use myLoadersMap = new HashMap(); private final ClasspathCache myCache = new ClasspathCache(); - private final Set myURLsWithProtectionDomain; + private final Set myURLsWithProtectionDomain; final boolean myCanLockJars; // true implies that the .jar file will not be modified in the lifetime of the JarLoader private final boolean myCanUseCache; @@ -57,7 +57,7 @@ public class ClassPath { private final boolean myLogJarAccess; private final LinkedHashSet myJarAccessLog = new LinkedHashSet(); - public ClassPath(List urls, + public ClassPath(List urls, boolean canLockJars, boolean canUseCache, boolean acceptUnescapedUrls, @@ -67,7 +67,7 @@ public class ClassPath { @Nullable UrlClassLoader.CachingCondition cachingCondition, boolean logErrorOnMissingJar, boolean lazyClassloadingCaches, - @NotNull Set urlsWithProtectionDomain, + @NotNull Set urlsWithProtectionDomain, boolean logJarAccess) { myLazyClassloadingCaches = lazyClassloadingCaches; myCanLockJars = canLockJars; @@ -91,7 +91,7 @@ public class ClassPath { push(Collections.singletonList(url)); } - private void push(List urls) { + private void push(List urls) { if (!urls.isEmpty()) { synchronized (myUrls) { for (int i = urls.size() - 1; i >= 0; i--) { diff --git a/platform/util-class-loader/src/com/intellij/util/lang/UrlClassLoader.java b/platform/util-class-loader/src/com/intellij/util/lang/UrlClassLoader.java index 5f25fc9ebbe1..9551fd184dec 100644 --- a/platform/util-class-loader/src/com/intellij/util/lang/UrlClassLoader.java +++ b/platform/util-class-loader/src/com/intellij/util/lang/UrlClassLoader.java @@ -101,8 +101,8 @@ public class UrlClassLoader extends ClassLoader { } public static final class Builder { - private List myURLs = ContainerUtilRt.emptyList(); - private Set myURLsWithProtectionDomain = new HashSet(); + private List myURLs = ContainerUtilRt.emptyList(); + private Set myURLsWithProtectionDomain = new HashSet(); private ClassLoader myParent; private boolean myLockJars; private boolean myUseCache; @@ -119,7 +119,7 @@ public class UrlClassLoader extends ClassLoader { Builder() { } @NotNull - public Builder urls(@NotNull List urls) { myURLs = urls; return this; } + public Builder urls(@NotNull List urls) { myURLs = urls; return this; } @NotNull public Builder urls(@NotNull URL... urls) { myURLs = Arrays.asList(urls); return this; } @NotNull @@ -129,7 +129,7 @@ public class UrlClassLoader extends ClassLoader { * @param urls List of URLs that are signed by Sun/Oracle and their signatures must be verified. */ @NotNull - Builder urlsWithProtectionDomain(@NotNull Set urls) { myURLsWithProtectionDomain = urls; return this; } + Builder urlsWithProtectionDomain(@NotNull Set urls) { myURLsWithProtectionDomain = urls; return this; } /** * @see #urlsWithProtectionDomain(Set)