Commit 17e5950
committed
Fix resource loading in HtmlSanitizerFuzzerTest
Replace org.apache.commons.codec.Resources.getInputStream() with
standard Java class loader resource loading. The commons-codec
Resources class uses the thread context class loader which may not
have test resources on its classpath in certain environments like
GitHub Actions with Maven Surefire.
Using getClass().getClassLoader().getResourceAsStream() is more
reliable because it uses the same class loader that loaded the test
class, guaranteeing the resource will be found.1 parent 16ce6bb commit 17e5950
1 file changed
Lines changed: 12 additions & 5 deletions
Lines changed: 12 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
40 | | - | |
41 | | - | |
42 | 41 | | |
43 | 42 | | |
44 | 43 | | |
| |||
62 | 61 | | |
63 | 62 | | |
64 | 63 | | |
65 | | - | |
66 | | - | |
67 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
68 | 75 | | |
69 | 76 | | |
70 | 77 | | |
| |||
0 commit comments