Make it handle whitespace in paths correctly - even better by using toURI()

This commit is contained in:
Christian Sailer 2017-10-16 14:36:43 +01:00
parent ead805fb21
commit d8462ad662
2 changed files with 5 additions and 2 deletions

3
.idea/compiler.xml generated
View File

@ -99,6 +99,9 @@
<module name="sgx-jvm_test" target="1.8" />
<module name="sgx-signtool_main" target="1.8" />
<module name="sgx-signtool_test" target="1.8" />
<module name="signing-server_integrationTest" target="1.8" />
<module name="signing-server_main" target="1.8" />
<module name="signing-server_test" target="1.8" />
<module name="simm-valuation-demo_integrationTest" target="1.8" />
<module name="simm-valuation-demo_main" target="1.8" />
<module name="simm-valuation-demo_test" target="1.8" />

View File

@ -8,8 +8,8 @@ import kotlin.test.assertEquals
import kotlin.test.assertFailsWith
class ConfigurationTest {
private val validConfigPath = File(java.net.URLDecoder.decode(javaClass.getResource("/signing_service.conf").path, "UTF-8")).absolutePath
private val invalidConfigPath = File(java.net.URLDecoder.decode(javaClass.getResource("/signing_service_fail.conf").path, "UTF-8")).absolutePath
private val validConfigPath = File(javaClass.getResource("/signing_service.conf").toURI()).absolutePath
private val invalidConfigPath = File(javaClass.getResource("/signing_service_fail.conf").toURI()).absolutePath
@Test
fun `authMode is parsed correctly`() {