Propose convert to string template as inspection more frequent

This commit is contained in:
Simon Ogorodnik
2018-02-22 15:10:47 +03:00
committed by Stanislav Erokhin
parent 4c15642e2c
commit 57e47d1830
11 changed files with 60 additions and 30 deletions
+3 -8
View File
@@ -2,13 +2,8 @@
package demo;
class Test {
static void subListRangeCheck(int fromIndex, int toIndex, int size) {
if (fromIndex < 0)
throw new IndexOutOfBoundsException("fromIndex = " + fromIndex);
if (toIndex > size)
throw new IndexOutOfBoundsException("toIndex = " + toIndex);
if (fromIndex > toIndex)
throw new IllegalArgumentException("fromIndex(" + fromIndex
+ ") > toIndex(" + toIndex + ")");
static void bar(int a) {
if (a < 0)
throw new RuntimeException("a = " + a);
}
}