rename createMap() -> createConcurrentMap()

This commit is contained in:
Daniil Ovchinnikov
2016-09-27 17:57:54 +03:00
parent c6add71e83
commit bc62a61c96
2 changed files with 6 additions and 4 deletions
@@ -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
@@ -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);
});