Mercurial > hg > Database > Alice
changeset 582:2aac0644f92d dispose
change TopologyNodeConfig constractor
author | Nozomi Teruya <e125769@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 18 Dec 2015 01:34:12 +0900 |
parents | 26033ebb30ec |
children | ded89ea8861f 8f765e3eed24 |
files | src/main/java/alice/daemon/Config.java src/main/java/alice/topology/node/TopologyNodeConfig.java |
diffstat | 2 files changed, 31 insertions(+), 33 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/alice/daemon/Config.java Fri Dec 18 00:30:41 2015 +0900 +++ b/src/main/java/alice/daemon/Config.java Fri Dec 18 01:34:12 2015 +0900 @@ -22,39 +22,37 @@ public LinkedList<String> setConfig(int i, String []args){ configArgs = new LinkedList<String>(); - if (configArgs.isEmpty()){ - if ("-p".equals(args[i])) { - localPort = Integer.parseInt(args[++i]); - configArgs.add("-p"); - configArgs.add(args[i]); - } else if ("-log".equals(args[i])) { - logFile = args[++i]; - configArgs.add("-log"); - configArgs.add(args[i]); - } else if ("-n".equals(args[i])) { - nis = args[++i]; - configArgs.add("-n"); - configArgs.add(args[i]); - } else if ("-a".equals(args[i])) { - MCSTADDR = args[++i]; - configArgs.add("-a"); - configArgs.add(args[i]); - } else if ("-level".equals(args[i])) { - String levelStr = args[++i]; - if (levelStr.equals("fatal")) { - level = Level.FATAL; - } else if (levelStr.equals("error")) { - level = Level.ERROR; - } else if (levelStr.equals("warn")) { - level = Level.WARN; - } else if (levelStr.equals("info")) { - level = Level.INFO; - } else if (levelStr.equals("debug")) { - level = Level.DEBUG; - } - configArgs.add("-level"); - configArgs.add(args[i]); + if ("-p".equals(args[i])) { + localPort = Integer.parseInt(args[++i]); + configArgs.add("-p"); + configArgs.add(args[i]); + } else if ("-log".equals(args[i])) { + logFile = args[++i]; + configArgs.add("-log"); + configArgs.add(args[i]); + } else if ("-n".equals(args[i])) { + nis = args[++i]; + configArgs.add("-n"); + configArgs.add(args[i]); + } else if ("-a".equals(args[i])) { + MCSTADDR = args[++i]; + configArgs.add("-a"); + configArgs.add(args[i]); + } else if ("-level".equals(args[i])) { + String levelStr = args[++i]; + if (levelStr.equals("fatal")) { + level = Level.FATAL; + } else if (levelStr.equals("error")) { + level = Level.ERROR; + } else if (levelStr.equals("warn")) { + level = Level.WARN; + } else if (levelStr.equals("info")) { + level = Level.INFO; + } else if (levelStr.equals("debug")) { + level = Level.DEBUG; } + configArgs.add("-level"); + configArgs.add(args[i]); } return configArgs;
--- a/src/main/java/alice/topology/node/TopologyNodeConfig.java Fri Dec 18 00:30:41 2015 +0900 +++ b/src/main/java/alice/topology/node/TopologyNodeConfig.java Fri Dec 18 01:34:12 2015 +0900 @@ -14,7 +14,7 @@ private ArrayList<Class> eventList = new ArrayList<Class>(); public TopologyNodeConfig() { - super(null); + super(new String[]{}); } public TopologyNodeConfig(String[] args) { super(args);