mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 08:27:12 -07:00
For development: look up kobalt.properties locally if not found in the class loader.
This commit is contained in:
parent
c986fc6d65
commit
bc0eac0d0a
1 changed files with 12 additions and 1 deletions
|
@ -57,7 +57,18 @@ public class Main {
|
||||||
if (url != null) {
|
if (url != null) {
|
||||||
readProperties(result, url.openConnection().getInputStream());
|
readProperties(result, url.openConnection().getInputStream());
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalArgumentException("Couldn't find " + KOBALT_PROPERTIES);
|
File file = new File("src/main/resources/kobalt.properties");
|
||||||
|
if (file.exists()) {
|
||||||
|
FileInputStream fis = null;
|
||||||
|
try {
|
||||||
|
fis = new FileInputStream(file);
|
||||||
|
readProperties(result, fis);
|
||||||
|
} finally {
|
||||||
|
if (fis != null) fis.close();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
throw new IllegalArgumentException("Couldn't find " + KOBALT_PROPERTIES);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue