mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Changing preconditions order may have significant performance implications.
This commit is contained in:
+1
-3
@@ -94,10 +94,8 @@ public class GroovyPropertyUtils {
|
||||
public static boolean isSimplePropertyGetter(PsiMethod method, String propertyName) {
|
||||
if (method == null || method.isConstructor()) return false;
|
||||
if (method.getParameterList().getParametersCount() != 0) return false;
|
||||
final PsiType type = method.getReturnType();
|
||||
if (type != null && type == PsiType.VOID) return false;
|
||||
if (!isGetterName(method.getName())) return false;
|
||||
return propertyName == null || propertyName.equals(getPropertyNameByGetter(method));
|
||||
return (propertyName == null || propertyName.equals(getPropertyNameByGetter(method))) && method.getReturnType() != PsiType.VOID;
|
||||
}
|
||||
|
||||
public static boolean isSimplePropertySetter(PsiMethod method) {
|
||||
|
||||
Reference in New Issue
Block a user