warn about nonexistent classpath resources

This commit is contained in:
dfsek
2022-06-07 11:17:07 -07:00
parent 098cb740dd
commit c811fd31b1

View File

@@ -291,6 +291,10 @@ public abstract class AbstractPlatform implements Platform {
logger.debug("Copying resource {}", resourcePath);
try(InputStream is = getClass().getResourceAsStream("/" + resourcePath);
OutputStream os = new FileOutputStream(resource)) {
if(is == null) {
logger.error("Resource {} doesn't exist on the classpath!", resourcePath);
return;
}
IOUtils.copy(is, os);
} catch(IOException e) {
throw new UncheckedIOException(e);