zero tolerance fixes

GitOrigin-RevId: 616984c9887fd113f8785403d4567b376e58745f
This commit is contained in:
Ilyas Selimov
2022-02-18 12:22:00 +07:00
committed by intellij-monorepo-bot
parent 0bfa6106ba
commit 4aaad04a9e
4 changed files with 6 additions and 6 deletions

View File

@@ -154,7 +154,7 @@ public class StructuralSearchDialog extends DialogWrapper implements DocumentLis
private final boolean myEditConfigOnly;
// components
private final int COMMON_SIDE_INSET = 10;
private static final int COMMON_SIDE_INSET = 10;
private final FileTypeChooser myFileTypeChooser = new FileTypeChooser();
private ActionToolbarImpl myOptionsToolbar;
private EditorTextField mySearchCriteriaEdit;

View File

@@ -25,7 +25,7 @@ public class UtilityClassCanBeEnumInspectionTest extends LightJavaInspectionTest
public void testUtilityClassInstantiation() {
doTest("class SmartStepClass {\n" +
" public static final int a = Integer.valueOf(1);\n" +
" public static final int a = 1;\n" +
" public static final String b = String.valueOf(2);\n" +
"\n" +
" public static void main(String[] args) {\n" +

View File

@@ -369,7 +369,7 @@ public class GitLogProviderTest extends GitSingleRepoTest {
final Function<String, Hash> TO_HASH = s -> HashImpl.build(s);
return ContainerUtil.map(StringUtil.splitByLines(output), record -> {
String[] items = ArrayUtilRt.toStringArray(StringUtil.split(record, "|", true, false));
long time = Long.valueOf(items[2]) * 1000;
long time = Long.parseLong(items[2]) * 1000;
return new VcsCommitMetadataImpl(TO_HASH.fun(items[0]), ContainerUtil.map(items[1].split(" "), TO_HASH), time,
getProjectRoot(), items[3], defaultUser, items[4], defaultUser, time);
});

View File

@@ -54,7 +54,7 @@ public class PyEvaluatorTest extends PyTestCase {
}
public void testLong() {
final long expected = Long.valueOf(Integer.MAX_VALUE) + 1;
final long expected = (long)Integer.MAX_VALUE + 1;
final long l = byExpression(Long.toString(expected), Long.class);
assertEquals(expected, l);
}
@@ -227,8 +227,8 @@ public class PyEvaluatorTest extends PyTestCase {
public void testNumbersAddition() {
assertEquals(Integer.valueOf(3), byExpression("1 + 2", Integer.class));
assertEquals(Long.valueOf(Long.valueOf(Integer.MAX_VALUE) + 1), byExpression("1 + " + Integer.MAX_VALUE, Long.class));
assertEquals(Long.valueOf(Long.valueOf(Integer.MAX_VALUE) + 1), byExpression(Integer.MAX_VALUE + "+ 1", Long.class));
assertEquals(Long.valueOf((long)Integer.MAX_VALUE + 1), byExpression("1 + " + Integer.MAX_VALUE, Long.class));
assertEquals(Long.valueOf((long)Integer.MAX_VALUE + 1), byExpression(Integer.MAX_VALUE + "+ 1", Long.class));
assertEquals(BigInteger.valueOf(Long.MAX_VALUE).add(BigInteger.ONE), byExpression("1 + " + Long.MAX_VALUE, BigInteger.class));
assertEquals(BigInteger.valueOf(Long.MAX_VALUE).add(BigInteger.ONE), byExpression(Long.MAX_VALUE + "+ 1", BigInteger.class));