mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 15:09:39 +07:00
cleanup
GitOrigin-RevId: 7c67cd623cd409d434ef03d6fc3293bd921b3cc7
This commit is contained in:
committed by
intellij-monorepo-bot
parent
19cc069765
commit
ac2c0aafb3
@@ -358,7 +358,7 @@ public class ContainerUtilCollectionsTest extends Assert {
|
||||
}
|
||||
@Test
|
||||
public void testSoftMapMustNotAcceptNullKey() {
|
||||
assertNullKeysMustThrow(ContainerUtil.createSoftMap());
|
||||
assertNullKeysMustThrow(CollectionFactory.createSoftMap());
|
||||
}
|
||||
@Test
|
||||
public void testWeakKeySoftValueMapMustNotAcceptNullKey() {
|
||||
@@ -370,7 +370,7 @@ public class ContainerUtilCollectionsTest extends Assert {
|
||||
}
|
||||
@Test
|
||||
public void testSoftKeySoftValueMapMustNotAcceptNullKey() {
|
||||
assertNullKeysMustThrow(ContainerUtil.createSoftKeySoftValueMap());
|
||||
assertNullKeysMustThrow(CollectionFactory.createSoftKeySoftValueMap());
|
||||
}
|
||||
@Test
|
||||
public void testSoftValueMapMustNotAcceptNullKey() {
|
||||
@@ -459,7 +459,7 @@ public class ContainerUtilCollectionsTest extends Assert {
|
||||
|
||||
@Test(timeout = TIMEOUT)
|
||||
public void testSoftKeySoftValueMapTossed() {
|
||||
Map<Object, Object> map = ContainerUtil.createSoftKeySoftValueMap();
|
||||
Map<Object, Object> map = CollectionFactory.createSoftKeySoftValueMap();
|
||||
checkKeyTossedEventually(map);
|
||||
checkValueTossedEventually(map);
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ package com.intellij.openapi.util;
|
||||
import com.intellij.openapi.Disposable;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.util.ExceptionUtil;
|
||||
import com.intellij.util.containers.CollectionFactory;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import org.jetbrains.annotations.*;
|
||||
|
||||
@@ -238,7 +239,7 @@ public final class RecursionManager {
|
||||
private int firstLoopStart = Integer.MAX_VALUE; // outermost recursion-prevented frame depth; memoized values are dropped on its change.
|
||||
private final LinkedHashMap<MyKey, StackFrame> progressMap = new LinkedHashMap<>();
|
||||
private final Map<MyKey, Throwable> preventions = new IdentityHashMap<>();
|
||||
private final Map<@NotNull MyKey, MemoizedValue> intermediateCache = ContainerUtil.createSoftKeySoftValueMap();
|
||||
private final Map<@NotNull MyKey, MemoizedValue> intermediateCache = CollectionFactory.createSoftKeySoftValueMap();
|
||||
private int enters;
|
||||
private int exits;
|
||||
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
// Copyright 2000-2020 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-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package org.jetbrains.idea.svn.dialogs.browserCache
|
||||
|
||||
import com.intellij.openapi.components.service
|
||||
import com.intellij.openapi.vcs.VcsException
|
||||
import com.intellij.util.containers.ContainerUtil.createSoftMap
|
||||
import com.intellij.util.containers.CollectionFactory
|
||||
import org.jetbrains.idea.svn.api.Url
|
||||
import org.jetbrains.idea.svn.browse.DirectoryEntry
|
||||
|
||||
class SvnRepositoryCache private constructor() {
|
||||
private val myMap = createSoftMap<Url, List<DirectoryEntry>>()
|
||||
private val myErrorsMap = createSoftMap<Url, VcsException>()
|
||||
private val myMap = CollectionFactory.createSoftMap<Url, List<DirectoryEntry>>()
|
||||
private val myErrorsMap = CollectionFactory.createSoftMap<Url, VcsException>()
|
||||
|
||||
fun getChildren(parent: Url): List<DirectoryEntry>? = myMap[parent]
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2021 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-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package org.jetbrains.idea.svn.history;
|
||||
|
||||
import com.intellij.openapi.Disposable;
|
||||
@@ -10,7 +10,7 @@ import com.intellij.openapi.vcs.changes.committed.ChangesBunch;
|
||||
import com.intellij.openapi.vcs.changes.committed.CommittedChangesCache;
|
||||
import com.intellij.openapi.vcs.changes.committed.CommittedChangesListener;
|
||||
import com.intellij.openapi.vcs.versionBrowser.CommittedChangeList;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import com.intellij.util.containers.CollectionFactory;
|
||||
import com.intellij.util.messages.MessageBusConnection;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -32,7 +32,7 @@ public final class LoadedRevisionsCache implements Disposable {
|
||||
|
||||
private LoadedRevisionsCache(final Project project) {
|
||||
myProject = project;
|
||||
myMap = (ApplicationManager.getApplication().isUnitTestMode()) ? new HashMap<>() : ContainerUtil.createSoftMap();
|
||||
myMap = ApplicationManager.getApplication().isUnitTestMode() ? new HashMap<String, Bunch>() : CollectionFactory.createSoftMap();
|
||||
|
||||
myConnection = project.getMessageBus().connect();
|
||||
myConnection.subscribe(CommittedChangesCache.COMMITTED_TOPIC, new CommittedChangesListener() {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2021 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-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package org.jetbrains.idea.svn.mergeinfo;
|
||||
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
@@ -11,7 +11,7 @@ import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.ui.MessageType;
|
||||
import com.intellij.openapi.vcs.VcsException;
|
||||
import com.intellij.openapi.vcs.ui.VcsBalloonProblemNotifier;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import com.intellij.util.containers.CollectionFactory;
|
||||
import com.intellij.util.messages.Topic;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -152,7 +152,7 @@ public final class SvnMergeInfoCache {
|
||||
private static final class MyCurrentUrlData {
|
||||
|
||||
// key - working copy local path
|
||||
@NotNull private final Map<String, BranchInfo> myBranchInfo = ContainerUtil.createSoftMap();
|
||||
@NotNull private final Map<String, BranchInfo> myBranchInfo = CollectionFactory.createSoftMap();
|
||||
|
||||
private MyCurrentUrlData() {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user