ReadWriteStringCanBeUsedInspection: WARNING -> GENERIC_ERROR_OR_WARNING

This commit is contained in:
Tagir Valeev
2018-11-07 16:12:31 +07:00
parent 523a84f645
commit c02cf15a2a
5 changed files with 5 additions and 5 deletions
@@ -43,7 +43,7 @@ public class ReadWriteStringCanBeUsedInspection extends AbstractBaseJavaLocalIns
ProblemHighlightType highlight;
String message = "Can be replaced with 'Files.writeString()'";
if (level.isAtLeast(LanguageLevel.JDK_12) || isNonUtf8Charset(bytesExpression.getArgumentList().getExpressions()[0])) {
highlight = ProblemHighlightType.WARNING;
highlight = ProblemHighlightType.GENERIC_ERROR_OR_WARNING;
} else {
highlight = ProblemHighlightType.INFORMATION;
}
@@ -1,4 +1,4 @@
// "Replace with 'Files.writeString()'" "WARNING"
// "Replace with 'Files.writeString()'" "GENERIC_ERROR_OR_WARNING"
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.charset.Charset;
@@ -1,4 +1,4 @@
// "Replace with 'Files.writeString()'" "WARNING"
// "Replace with 'Files.writeString()'" "GENERIC_ERROR_OR_WARNING"
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.charset.Charset;
@@ -1,4 +1,4 @@
// "Replace with 'Files.writeString()'" "WARNING"
// "Replace with 'Files.writeString()'" "GENERIC_ERROR_OR_WARNING"
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.charset.Charset;
@@ -1,4 +1,4 @@
// "Replace with 'Files.writeString()'" "WARNING"
// "Replace with 'Files.writeString()'" "GENERIC_ERROR_OR_WARNING"
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.charset.Charset;