Added conditions for some robustness
This commit is contained in:
parent
930ad2b2f3
commit
31c700b738
3 changed files with 4 additions and 2 deletions
|
|
@ -101,6 +101,8 @@ public class Templator {
|
|||
* be regenerated if the file changes.
|
||||
*/
|
||||
public Templator(File tmpl) throws IOException {
|
||||
if(tmpl == null)
|
||||
throw new IllegalArgumentException("File can not be null!");
|
||||
this.data = new HashMap<String, Object>();
|
||||
this.file = tmpl;
|
||||
parseTemplate(FileUtil.getContent(file));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue