Switched exception in Templator and removed state update in UPS constructor

This commit is contained in:
Ziver Koc 2016-04-07 14:31:36 +02:00
parent f86693ea16
commit 609716adcb
2 changed files with 1 additions and 2 deletions

View file

@ -47,7 +47,6 @@ public class NutUPSClient {
this.host = host;
this.port = port;
this.pollTimer = new Timer(POLL_INTERVAL);
update();
}

View file

@ -102,7 +102,7 @@ public class Templator {
*/
public Templator(File tmpl) throws IOException {
if(tmpl == null)
throw new IllegalArgumentException("File can not be null!");
throw new IOException("File can not be null!");
this.data = new HashMap<String, Object>();
this.file = tmpl;
parseTemplate(FileUtil.getContent(file));