mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
rename createMap() -> createConcurrentMap()
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2013 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -16,6 +16,7 @@
|
||||
package com.intellij.util.containers;
|
||||
|
||||
import com.intellij.util.Function;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.Map;
|
||||
@@ -30,7 +31,8 @@ public abstract class ConcurrentFactoryMap<T,V> extends FactoryMap<T,V> {
|
||||
return ContainerUtil.newConcurrentMap();
|
||||
}
|
||||
|
||||
public static <T, V> ConcurrentFactoryMap<T, V> createMap(final Function<T, V> computeValue) {
|
||||
@NotNull
|
||||
public static <T, V> ConcurrentFactoryMap<T, V> createConcurrentMap(@NotNull final Function<T, V> computeValue) {
|
||||
return new ConcurrentFactoryMap<T, V>() {
|
||||
@Nullable
|
||||
@Override
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -59,7 +59,7 @@ public class AnnotatedContextFilter implements ContextFilter {
|
||||
private static Map<String, Boolean> getPossibleAnnotations(final PsiFile file) {
|
||||
return CachedValuesManager.getCachedValue(file, () -> {
|
||||
Map<String, Boolean> result = StringUtil.contains(file.getViewProvider().getContents(), "@")
|
||||
? ConcurrentFactoryMap.createMap(anno -> containsString(anno, file))
|
||||
? ConcurrentFactoryMap.createConcurrentMap(anno -> containsString(anno, file))
|
||||
: Collections.emptyMap();
|
||||
return CachedValueProvider.Result.create(result, file);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user