Commit 94d460b1 authored by Alexey Kudravtsev's avatar Alexey Kudravtsev
Browse files

removed moronic nullable

parent fd7fc574
Branches unavailable Tags unavailable
No related merge requests found
Showing with 4 additions and 6 deletions
+4 -6
......@@ -94,6 +94,7 @@ public interface CachedValueProvider<T> {
* Creates a result
* @see #getDependencyItems()
*/
@NotNull
public static <T> Result<T> createSingleDependency(@Nullable T value, @NotNull Object dependency) {
return create(value, dependency);
}
......@@ -102,6 +103,7 @@ public interface CachedValueProvider<T> {
* Creates a result
* @see #getDependencyItems()
*/
@NotNull
public static <T> Result<T> create(@Nullable T value, @NotNull Object... dependencies) {
return new Result<>(value, dependencies);
}
......@@ -110,6 +112,7 @@ public interface CachedValueProvider<T> {
* Creates a result
* @see #getDependencyItems()
*/
@NotNull
public static <T> Result<T> create(@Nullable T value, @NotNull Collection<?> dependencies) {
return new Result<>(value, ArrayUtil.toObjectArray(dependencies));
}
......
......@@ -15,9 +15,7 @@
*/
package com.intellij.psi.util;
import org.jetbrains.annotations.Nullable;
@FunctionalInterface
public interface ParameterizedCachedValueProvider<ResultType, ParameterType> {
@Nullable
CachedValueProvider.Result<ResultType> compute(ParameterType param);
}
......@@ -181,7 +181,6 @@ public class PyCustomMember extends UserDataHolderBase {
if (myTypeName != null) {
final ParameterizedCachedValueProvider<PyClass, PsiElement> provider = new ParameterizedCachedValueProvider<PyClass, PsiElement>() {
@Nullable
@Override
public CachedValueProvider.Result<PyClass> compute(
final PsiElement param) {
......
......@@ -24,7 +24,6 @@ import com.intellij.xml.Html5SchemaProvider;
import com.intellij.xml.util.XmlUtil;
import gnu.trove.TIntObjectHashMap;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* @author Dennis.Ushakov
......@@ -32,7 +31,6 @@ import org.jetbrains.annotations.Nullable;
public class EscapeEntitiesAction extends BaseCodeInsightAction implements CodeInsightActionHandler {
private static final ParameterizedCachedValueImpl<TIntObjectHashMap<String>, PsiFile> ESCAPES = new ParameterizedCachedValueImpl<TIntObjectHashMap<String>, PsiFile>(
new ParameterizedCachedValueProvider<TIntObjectHashMap<String>, PsiFile>() {
@Nullable
@Override
public CachedValueProvider.Result<TIntObjectHashMap<String>> compute(PsiFile param) {
final XmlFile file = XmlUtil.findXmlFile(param, Html5SchemaProvider.getCharsDtdLocation());
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment