Do not escape quotes in IllegalStateException (#1895)

Now relativePath is logged correctly when resource is null.

fixes #1894
This commit is contained in:
Benedict Roeser
2023-04-26 12:58:07 +02:00
committed by GitHub
parent fe092b8981
commit ee52a9f6ae

View File

@@ -929,7 +929,7 @@ class YamlToContracts {
protected String file(String relativePath) {
URL resource = Thread.currentThread().getContextClassLoader().getResource(relativePath);
if (resource == null) {
throw new IllegalStateException("File [\"+relativePath+\"] is not present");
throw new IllegalStateException("File [" + relativePath + "] is not present");
}
try {
return String.join("\n", Files.readAllLines(Paths.get(resource.toURI())));