Skip to content

Commit

Permalink
Don't use File
Browse files Browse the repository at this point in the history
  • Loading branch information
BraisGabin committed Feb 22, 2024
1 parent da87826 commit fd3d914
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.github.detekt.sarif4k

import org.junit.jupiter.api.Test
import java.io.File
import java.io.Reader
import kotlin.test.assertEquals

class SarifSerializerTest {
Expand Down Expand Up @@ -94,4 +94,4 @@ class SarifSerializerTest {
}
}

private fun getResource(path: String) = File(SarifSerializerTest::class.java.getResource(path)!!.path)
private fun getResource(path: String): Reader = SarifSerializerTest::class.java.getResourceAsStream(path)!!.reader()

0 comments on commit fd3d914

Please sign in to comment.