mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-06-19 07:11:14 +00:00
warn about nonexistent classpath resources
This commit is contained in:
@@ -291,6 +291,10 @@ public abstract class AbstractPlatform implements Platform {
|
|||||||
logger.debug("Copying resource {}", resourcePath);
|
logger.debug("Copying resource {}", resourcePath);
|
||||||
try(InputStream is = getClass().getResourceAsStream("/" + resourcePath);
|
try(InputStream is = getClass().getResourceAsStream("/" + resourcePath);
|
||||||
OutputStream os = new FileOutputStream(resource)) {
|
OutputStream os = new FileOutputStream(resource)) {
|
||||||
|
if(is == null) {
|
||||||
|
logger.error("Resource {} doesn't exist on the classpath!", resourcePath);
|
||||||
|
return;
|
||||||
|
}
|
||||||
IOUtils.copy(is, os);
|
IOUtils.copy(is, os);
|
||||||
} catch(IOException e) {
|
} catch(IOException e) {
|
||||||
throw new UncheckedIOException(e);
|
throw new UncheckedIOException(e);
|
||||||
|
|||||||
Reference in New Issue
Block a user