migration inspection: assign weak warning to produce annoyance

This commit is contained in:
Anna Kozlova
2014-03-05 11:39:49 +01:00
parent 380c7a998e
commit 9860e6bfee
2 changed files with 3 additions and 3 deletions
@@ -111,10 +111,10 @@ public class StreamApiMigrationInspection extends BaseJavaBatchLocalInspectionTo
if (effectivelyFinal[0]) {
if (isCollectCall(body)) {
holder.registerProblem(iteratedValue, "Can be replaced with collect call",
ProblemHighlightType.LIKE_UNUSED_SYMBOL, new ReplaceWithCollectCallFix());
ProblemHighlightType.GENERIC_ERROR_OR_WARNING, new ReplaceWithCollectCallFix());
} else if (!isTrivial(body, statement.getIterationParameter(), iteratedValueType)) {
holder.registerProblem(iteratedValue, "Can be replaced with foreach call",
ProblemHighlightType.LIKE_UNUSED_SYMBOL, new ReplaceWithForeachCallFix());
ProblemHighlightType.GENERIC_ERROR_OR_WARNING, new ReplaceWithForeachCallFix());
}
}
}
+1 -1
View File
@@ -624,7 +624,7 @@
groupName="Java language level migration aids" enabledByDefault="true" level="WARNING"
implementationClass="com.intellij.codeInspection.AnonymousCanBeLambdaInspection" />
<localInspection language="JAVA" shortName="Convert2streamapi" displayName="foreach loop can be collapsed with stream api"
groupName="Java language level migration aids" enabledByDefault="true" level="WARNING" implementationClass="com.intellij.codeInspection.StreamApiMigrationInspection"/>
groupName="Java language level migration aids" enabledByDefault="true" level="WEAK WARNING" implementationClass="com.intellij.codeInspection.StreamApiMigrationInspection"/>
<localInspection language="JAVA" shortName="Anonymous2MethodRef" displayName="Anonymous type can be replaced with method reference"
groupName="Java language level migration aids" enabledByDefault="true" level="WARNING"
implementationClass="com.intellij.codeInspection.AnonymousCanBeMethodReferenceInspection" />