mirror of
https://github.com/github/codeql.git
synced 2026-05-01 19:55:15 +02:00
Correct minor compilation errors in test code
This commit is contained in:
@@ -120,7 +120,7 @@ public class B {
|
||||
}
|
||||
|
||||
private Object mkMaybe() {
|
||||
if (maybe) throw new Exception();
|
||||
if (maybe) throw new RuntimeException();
|
||||
return new Object();
|
||||
}
|
||||
|
||||
@@ -267,7 +267,7 @@ public class B {
|
||||
}
|
||||
if(msg != null) {
|
||||
msg += "foobar";
|
||||
throw new Exception(msg);
|
||||
throw new RuntimeException(msg);
|
||||
}
|
||||
obj.hashCode(); // OK
|
||||
}
|
||||
@@ -286,7 +286,7 @@ public class B {
|
||||
|
||||
int[] b = maybe ? null : new int[iters];
|
||||
if (iters > 0 && (b == null || b.length < iters)) {
|
||||
throw new Exception();
|
||||
throw new RuntimeException();
|
||||
}
|
||||
for (int i = 0; i < iters; ++i) {
|
||||
b[i] = 0; // NPE - false positive
|
||||
|
||||
@@ -87,7 +87,7 @@ public class C {
|
||||
vals[0] = 0; // OK
|
||||
break;
|
||||
default:
|
||||
throw new Exception();
|
||||
throw new RuntimeException();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user