diff --git a/java/java-analysis-impl/src/com/intellij/codeInspection/dataFlow/ContractInspection.java b/java/java-analysis-impl/src/com/intellij/codeInspection/dataFlow/ContractInspection.java
index a2c5099b71a0..40f8d8dba6cf 100644
--- a/java/java-analysis-impl/src/com/intellij/codeInspection/dataFlow/ContractInspection.java
+++ b/java/java-analysis-impl/src/com/intellij/codeInspection/dataFlow/ContractInspection.java
@@ -1,4 +1,4 @@
-// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
+// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.codeInspection.dataFlow;
import com.intellij.codeInsight.AnnotationUtil;
@@ -48,16 +48,8 @@ public class ContractInspection extends AbstractBaseJavaLocalInspectionTool {
PsiAnnotationMemberValue value = annotation.findAttributeValue(null);
assert value != null;
holder.registerProblem(value, error);
- return;
}
}
-
- if (Boolean.TRUE.equals(AnnotationUtil.getBooleanAttributeValue(annotation, "pure")) &&
- PsiType.VOID.equals(method.getReturnType())) {
- PsiAnnotationMemberValue value = annotation.findDeclaredAttributeValue("pure");
- assert value != null;
- holder.registerProblem(value, "Pure methods must return something, void is not allowed as a return type");
- }
}
};
}
diff --git a/java/java-tests/testData/inspection/dataFlow/contractCheck/SignatureIssues.java b/java/java-tests/testData/inspection/dataFlow/contractCheck/SignatureIssues.java
index 412a4c820bbd..544dadb2f6b5 100644
--- a/java/java-tests/testData/inspection/dataFlow/contractCheck/SignatureIssues.java
+++ b/java/java-tests/testData/inspection/dataFlow/contractCheck/SignatureIssues.java
@@ -8,7 +8,7 @@ class Foo {
@Contract("null -> _")
void wrongParameterCount(Object a, boolean b) {}
- @Contract(pure=true)
+ @Contract(pure=true)
void voidPureMethod() {}
@Contract("->null")