New J2K: add ReplaceGuardClause inspection to post-processing

#KT-22412 Fixed
This commit is contained in:
Toshiaki Kameyama
2019-08-08 23:54:01 +09:00
committed by Ilya Kirillov
parent 51e007116f
commit 154cf46f7c
4 changed files with 19 additions and 1 deletions
+7
View File
@@ -0,0 +1,7 @@
public class Test {
void test(String s) {
if (s == null) {
throw new IllegalArgumentException("s should not be null");
}
}
}
+5
View File
@@ -0,0 +1,5 @@
class Test {
internal fun test(s: String?) {
requireNotNull(s) { "s should not be null" }
}
}