fix annotation, add @Contract

This commit is contained in:
Bas Leijdekkers
2016-07-17 23:55:50 +02:00
parent fa0ab89b09
commit cde26d662e
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2015 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.
@@ -27,6 +27,7 @@ import com.intellij.psi.codeStyle.VariableKind;
import com.intellij.util.ArrayUtil;
import com.intellij.util.IncorrectOperationException;
import com.intellij.util.containers.ContainerUtil;
import org.jetbrains.annotations.Contract;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -44,7 +45,8 @@ public class PropertyUtil {
private PropertyUtil() {
}
public static boolean isSimplePropertyGetter(@NotNull PsiMethod method) {
@Contract("null -> false")
public static boolean isSimplePropertyGetter(@Nullable PsiMethod method) {
return hasGetterName(method) && method.getParameterList().getParametersCount() == 0;
}