Switched exception in Templator and removed state update in UPS constructor
This commit is contained in:
parent
f86693ea16
commit
609716adcb
2 changed files with 1 additions and 2 deletions
|
|
@ -47,7 +47,6 @@ public class NutUPSClient {
|
||||||
this.host = host;
|
this.host = host;
|
||||||
this.port = port;
|
this.port = port;
|
||||||
this.pollTimer = new Timer(POLL_INTERVAL);
|
this.pollTimer = new Timer(POLL_INTERVAL);
|
||||||
update();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,7 @@ public class Templator {
|
||||||
*/
|
*/
|
||||||
public Templator(File tmpl) throws IOException {
|
public Templator(File tmpl) throws IOException {
|
||||||
if(tmpl == null)
|
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.data = new HashMap<String, Object>();
|
||||||
this.file = tmpl;
|
this.file = tmpl;
|
||||||
parseTemplate(FileUtil.getContent(file));
|
parseTemplate(FileUtil.getContent(file));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue