Commit 68286b5
committed
fix: Hoist getClass() out of assertThatThrownBy lambdas
Sonar S5778 — each lambda should have at most one invocation that
can throw a runtime exception. Both getClass() and Spec.fromClasspath
were inside the lambda; the call we're actually asserting against is
Spec.fromClasspath, so pull the class lookup out into a local first.1 parent 074df3b commit 68286b5
1 file changed
Lines changed: 4 additions & 2 deletions
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
44 | | - | |
| 45 | + | |
| 46 | + | |
45 | 47 | | |
46 | 48 | | |
47 | 49 | | |
| |||
0 commit comments