Propose convert to string template as inspection more frequent
This commit is contained in:
committed by
Stanislav Erokhin
parent
4c15642e2c
commit
57e47d1830
+3
-8
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user